aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/xor.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/X86/xor.ll')
-rw-r--r--test/CodeGen/X86/xor.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/xor.ll b/test/CodeGen/X86/xor.ll
index ea84a3b..829be41 100644
--- a/test/CodeGen/X86/xor.ll
+++ b/test/CodeGen/X86/xor.ll
@@ -181,3 +181,15 @@ define i32 @PR17487(i1 %tobool) {
; X32-LABEL: PR17487:
; X32: andn
}
+
+define i32 @test11(i32 %b) {
+ %shl = shl i32 1, %b
+ %neg = xor i32 %shl, -1
+ ret i32 %neg
+; X64-LABEL: test11:
+; X64: movl $-2, %[[REG:.*]]
+; X64: roll %{{.*}}, %[[REG]]
+; X32-LABEL: test11:
+; X32: movl $-2, %[[REG:.*]]
+; X32: roll %{{.*}}, %[[REG]]
+}