summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/tbm_patterns.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-10-05 17:17:53 +0000
committerCraig Topper <craig.topper@gmail.com>2013-10-05 17:17:53 +0000
commite2522fd06c0844c7083cc2cbd3ad0aae960e4a00 (patch)
treece2b0be775399f93bde3ea7d5761813ddabf918c /test/CodeGen/X86/tbm_patterns.ll
parent5e195a4c8d8cd4498ab7e0aa16a3b6f273daf457 (diff)
downloadllvm-e2522fd06c0844c7083cc2cbd3ad0aae960e4a00.tar.gz
llvm-e2522fd06c0844c7083cc2cbd3ad0aae960e4a00.tar.bz2
llvm-e2522fd06c0844c7083cc2cbd3ad0aae960e4a00.tar.xz
Add an additional pattern for BLCI since opt can turn (not (add x, 1)) into (sub -2, x).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/tbm_patterns.ll')
-rw-r--r--test/CodeGen/X86/tbm_patterns.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/tbm_patterns.ll b/test/CodeGen/X86/tbm_patterns.ll
index 8b999be0ea..79eea10af3 100644
--- a/test/CodeGen/X86/tbm_patterns.ll
+++ b/test/CodeGen/X86/tbm_patterns.ll
@@ -84,6 +84,26 @@ entry:
ret i64 %2
}
+define i32 @test_x86_tbm_blci_u32_b(i32 %a) nounwind readnone {
+entry:
+ ; CHECK-LABEL: test_x86_tbm_blci_u32_b:
+ ; CHECK-NOT: mov
+ ; CHECK: blci %
+ %0 = sub i32 -2, %a
+ %1 = or i32 %0, %a
+ ret i32 %1
+}
+
+define i64 @test_x86_tbm_blci_u64_b(i64 %a) nounwind readnone {
+entry:
+ ; CHECK-LABEL: test_x86_tbm_blci_u64_b:
+ ; CHECK-NOT: mov
+ ; CHECK: blci %
+ %0 = sub i64 -2, %a
+ %1 = or i64 %0, %a
+ ret i64 %1
+}
+
define i32 @test_x86_tbm_blcic_u32(i32 %a) nounwind readnone {
entry:
; CHECK-LABEL: test_x86_tbm_blcic_u32: