aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/computeKnownBits_urem.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/computeKnownBits_urem.ll')
-rw-r--r--test/CodeGen/X86/computeKnownBits_urem.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/computeKnownBits_urem.ll b/test/CodeGen/X86/computeKnownBits_urem.ll
new file mode 100644
index 0000000..9902e6f
--- /dev/null
+++ b/test/CodeGen/X86/computeKnownBits_urem.ll
@@ -0,0 +1,14 @@
+; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s
+define i32 @main() #0 {
+entry:
+ %a = alloca i32, align 4
+ store i32 1, i32* %a, align 4
+ %0 = load i32* %a, align 4
+ %or = or i32 1, %0
+ %and = and i32 1, %or
+ %rem = urem i32 %and, 1
+ %add = add i32 %rem, 1
+ ret i32 %add
+}
+; CHECK: $1, %eax
+; CHECK-NEXT: retq