diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-09-18 09:56:40 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-09-18 09:56:40 +0000 |
commit | e2d6f91d63a2e8cf77b07794cda7d9ef72504769 (patch) | |
tree | 8aaa9c82d2ca65020e98eb5954302f1e01a81e2a /test/CodeGen/SystemZ/cond-store-03.ll | |
parent | 8634b0ee47be832fbf3fd6ceebb8ac9104106bc2 (diff) | |
download | external_llvm-e2d6f91d63a2e8cf77b07794cda7d9ef72504769.zip external_llvm-e2d6f91d63a2e8cf77b07794cda7d9ef72504769.tar.gz external_llvm-e2d6f91d63a2e8cf77b07794cda7d9ef72504769.tar.bz2 |
[SystemZ] Add unsigned compare-and-branch instructions
For some reason I never got around to adding these at the same time as
the signed versions. No idea why.
I'm not sure whether this SystemZII::BranchC* stuff is useful, or whether
it should just be replaced with an "is normal" flag. I'll leave that
for later though.
There are some boundary conditions that can be tweaked, such as preferring
unsigned comparisons for equality with [128, 256), and "<= 255" over "< 256",
but again I'll leave those for a separate patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ/cond-store-03.ll')
-rw-r--r-- | test/CodeGen/SystemZ/cond-store-03.ll | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/test/CodeGen/SystemZ/cond-store-03.ll b/test/CodeGen/SystemZ/cond-store-03.ll index e122bc2..d4fd48d 100644 --- a/test/CodeGen/SystemZ/cond-store-03.ll +++ b/test/CodeGen/SystemZ/cond-store-03.ll @@ -13,7 +13,7 @@ define void @f1(i32 *%ptr, i32 %alt, i32 %limit) { ; CHECK: st %r3, 0(%r2) ; CHECK: [[LABEL]]: ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -29,7 +29,7 @@ define void @f2(i32 *%ptr, i32 %alt, i32 %limit) { ; CHECK: st %r3, 0(%r2) ; CHECK: [[LABEL]]: ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %alt, i32 %orig store i32 %res, i32 *%ptr @@ -46,7 +46,7 @@ define void @f3(i32 *%ptr, i64 %alt, i32 %limit) { ; CHECK: st %r3, 0(%r2) ; CHECK: [[LABEL]]: ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %ext = sext i32 %orig to i64 %res = select i1 %cond, i64 %ext, i64 %alt @@ -64,7 +64,7 @@ define void @f4(i32 *%ptr, i64 %alt, i32 %limit) { ; CHECK: st %r3, 0(%r2) ; CHECK: [[LABEL]]: ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %ext = sext i32 %orig to i64 %res = select i1 %cond, i64 %alt, i64 %ext @@ -83,7 +83,7 @@ define void @f5(i32 *%ptr, i64 %alt, i32 %limit) { ; CHECK: st %r3, 0(%r2) ; CHECK: [[LABEL]]: ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %ext = zext i32 %orig to i64 %res = select i1 %cond, i64 %ext, i64 %alt @@ -101,7 +101,7 @@ define void @f6(i32 *%ptr, i64 %alt, i32 %limit) { ; CHECK: st %r3, 0(%r2) ; CHECK: [[LABEL]]: ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %ext = zext i32 %orig to i64 %res = select i1 %cond, i64 %alt, i64 %ext @@ -120,7 +120,7 @@ define void @f7(i32 *%base, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: br %r14 %ptr = getelementptr i32 *%base, i64 1023 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -137,7 +137,7 @@ define void @f8(i32 *%base, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: br %r14 %ptr = getelementptr i32 *%base, i64 1024 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -154,7 +154,7 @@ define void @f9(i32 *%base, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: br %r14 %ptr = getelementptr i32 *%base, i64 131071 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -173,7 +173,7 @@ define void @f10(i32 *%base, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: br %r14 %ptr = getelementptr i32 *%base, i64 131072 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -190,7 +190,7 @@ define void @f11(i32 *%base, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: br %r14 %ptr = getelementptr i32 *%base, i64 -131072 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -209,7 +209,7 @@ define void @f12(i32 *%base, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: br %r14 %ptr = getelementptr i32 *%base, i64 -131073 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -228,7 +228,7 @@ define void @f13(i64 %base, i64 %index, i32 %alt, i32 %limit) { %add1 = add i64 %base, %index %add2 = add i64 %add1, 4096 %ptr = inttoptr i64 %add2 to i32 * - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -243,7 +243,7 @@ define void @f14(i32 *%ptr, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: st {{%r[0-5]}}, 0(%r2) ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load volatile i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -258,7 +258,7 @@ define void @f15(i32 *%ptr, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: st %r3, 0(%r2) ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store volatile i32 %res, i32 *%ptr @@ -277,7 +277,7 @@ define void @f16(i32 *%ptr, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: st {{%r[0-5]}}, 0(%r2) ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load atomic i32 *%ptr unordered, align 4 %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr @@ -293,7 +293,7 @@ define void @f17(i32 *%ptr, i32 %alt, i32 %limit) { ; CHECK: [[LABEL]]: ; CHECK: cs {{%r[0-5]}}, %r3, 0(%r2) ; CHECK: br %r14 - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store atomic i32 %res, i32 *%ptr unordered, align 4 @@ -313,7 +313,7 @@ define void @f18(i32 %alt, i32 %limit) { ; CHECK: br %r14 %ptr = alloca i32 call void @foo(i32 *%ptr) - %cond = icmp ult i32 %limit, 42 + %cond = icmp ult i32 %limit, 420 %orig = load i32 *%ptr %res = select i1 %cond, i32 %orig, i32 %alt store i32 %res, i32 *%ptr |