summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/and-su.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/and-su.ll')
-rw-r--r--llvm/test/CodeGen/X86/and-su.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/and-su.ll b/llvm/test/CodeGen/X86/and-su.ll
new file mode 100644
index 00000000000..bdc845448f5
--- /dev/null
+++ b/llvm/test/CodeGen/X86/and-su.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s | llc -march=x86 | grep {(%} | count 1
+
+; Don't duplicate the load.
+
+define fastcc i32 @foo(i32* %p) nounwind {
+ %t0 = load i32* %p
+ %t2 = and i32 %t0, 10
+ %t3 = icmp ne i32 %t2, 0
+ br i1 %t3, label %bb63, label %bb76
+
+bb63:
+ ret i32 %t2
+
+bb76:
+ ret i32 0
+}
OpenPOWER on IntegriCloud