summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/equal_true.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/mir-opt/equal_true.rs')
-rw-r--r--src/test/mir-opt/equal_true.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/mir-opt/equal_true.rs b/src/test/mir-opt/equal_true.rs
new file mode 100644
index 000000000..994cd194a
--- /dev/null
+++ b/src/test/mir-opt/equal_true.rs
@@ -0,0 +1,9 @@
+// EMIT_MIR equal_true.opt.InstCombine.diff
+
+fn opt(x: bool) -> i32 {
+ if x == true { 0 } else { 1 }
+}
+
+fn main() {
+ opt(true);
+}