summaryrefslogtreecommitdiff
path: root/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-02-27 21:17:42 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-02-27 21:17:42 +0000
commit7c9c6ed761bf9d28c0c257a045b35781969136e0 (patch)
tree508cac951011b10e2817eacecc1fa640bbdba51e /test/CodeGen/AArch64/combine-comparisons-by-cse.ll
parentdc64962c8649964d13cc60b83c8c400d5ae7504a (diff)
[opaque pointer type] Add textual IR support for explicit type parameter to load instruction
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64/combine-comparisons-by-cse.ll')
-rw-r--r--test/CodeGen/AArch64/combine-comparisons-by-cse.ll84
1 files changed, 42 insertions, 42 deletions
diff --git a/test/CodeGen/AArch64/combine-comparisons-by-cse.ll b/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
index ccdd207a808..c78fabac618 100644
--- a/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
+++ b/test/CodeGen/AArch64/combine-comparisons-by-cse.ll
@@ -15,13 +15,13 @@ define i32 @combine_gt_ge_10() #0 {
; CHECK-NOT: cmp
; CHECK: b.lt
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp = icmp sgt i32 %0, 10
br i1 %cmp, label %land.lhs.true, label %lor.lhs.false
land.lhs.true: ; preds = %entry
- %1 = load i32* @b, align 4
- %2 = load i32* @c, align 4
+ %1 = load i32, i32* @b, align 4
+ %2 = load i32, i32* @c, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %return, label %land.lhs.true3
@@ -30,8 +30,8 @@ lor.lhs.false: ; preds = %entry
br i1 %cmp2, label %land.lhs.true3, label %if.end
land.lhs.true3: ; preds = %lor.lhs.false, %land.lhs.true
- %3 = load i32* @b, align 4
- %4 = load i32* @d, align 4
+ %3 = load i32, i32* @b, align 4
+ %4 = load i32, i32* @d, align 4
%cmp4 = icmp eq i32 %3, %4
br i1 %cmp4, label %return, label %if.end
@@ -52,13 +52,13 @@ define i32 @combine_gt_lt_5() #0 {
; CHECK-NOT: cmp
; CHECK: b.ge
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp = icmp sgt i32 %0, 5
br i1 %cmp, label %land.lhs.true, label %lor.lhs.false
land.lhs.true: ; preds = %entry
- %1 = load i32* @b, align 4
- %2 = load i32* @c, align 4
+ %1 = load i32, i32* @b, align 4
+ %2 = load i32, i32* @c, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %return, label %if.end
@@ -67,8 +67,8 @@ lor.lhs.false: ; preds = %entry
br i1 %cmp2, label %land.lhs.true3, label %if.end
land.lhs.true3: ; preds = %lor.lhs.false
- %3 = load i32* @b, align 4
- %4 = load i32* @d, align 4
+ %3 = load i32, i32* @b, align 4
+ %4 = load i32, i32* @d, align 4
%cmp4 = icmp eq i32 %3, %4
br i1 %cmp4, label %return, label %if.end
@@ -89,13 +89,13 @@ define i32 @combine_lt_ge_5() #0 {
; CHECK-NOT: cmp
; CHECK: b.gt
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp = icmp slt i32 %0, 5
br i1 %cmp, label %land.lhs.true, label %lor.lhs.false
land.lhs.true: ; preds = %entry
- %1 = load i32* @b, align 4
- %2 = load i32* @c, align 4
+ %1 = load i32, i32* @b, align 4
+ %2 = load i32, i32* @c, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %return, label %land.lhs.true3
@@ -104,8 +104,8 @@ lor.lhs.false: ; preds = %entry
br i1 %cmp2, label %land.lhs.true3, label %if.end
land.lhs.true3: ; preds = %lor.lhs.false, %land.lhs.true
- %3 = load i32* @b, align 4
- %4 = load i32* @d, align 4
+ %3 = load i32, i32* @b, align 4
+ %4 = load i32, i32* @d, align 4
%cmp4 = icmp eq i32 %3, %4
br i1 %cmp4, label %return, label %if.end
@@ -126,13 +126,13 @@ define i32 @combine_lt_gt_5() #0 {
; CHECK-NOT: cmp
; CHECK: b.le
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp = icmp slt i32 %0, 5
br i1 %cmp, label %land.lhs.true, label %lor.lhs.false
land.lhs.true: ; preds = %entry
- %1 = load i32* @b, align 4
- %2 = load i32* @c, align 4
+ %1 = load i32, i32* @b, align 4
+ %2 = load i32, i32* @c, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %return, label %if.end
@@ -141,8 +141,8 @@ lor.lhs.false: ; preds = %entry
br i1 %cmp2, label %land.lhs.true3, label %if.end
land.lhs.true3: ; preds = %lor.lhs.false
- %3 = load i32* @b, align 4
- %4 = load i32* @d, align 4
+ %3 = load i32, i32* @b, align 4
+ %4 = load i32, i32* @d, align 4
%cmp4 = icmp eq i32 %3, %4
br i1 %cmp4, label %return, label %if.end
@@ -163,13 +163,13 @@ define i32 @combine_gt_lt_n5() #0 {
; CHECK-NOT: cmn
; CHECK: b.ge
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp = icmp sgt i32 %0, -5
br i1 %cmp, label %land.lhs.true, label %lor.lhs.false
land.lhs.true: ; preds = %entry
- %1 = load i32* @b, align 4
- %2 = load i32* @c, align 4
+ %1 = load i32, i32* @b, align 4
+ %2 = load i32, i32* @c, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %return, label %if.end
@@ -178,8 +178,8 @@ lor.lhs.false: ; preds = %entry
br i1 %cmp2, label %land.lhs.true3, label %if.end
land.lhs.true3: ; preds = %lor.lhs.false
- %3 = load i32* @b, align 4
- %4 = load i32* @d, align 4
+ %3 = load i32, i32* @b, align 4
+ %4 = load i32, i32* @d, align 4
%cmp4 = icmp eq i32 %3, %4
br i1 %cmp4, label %return, label %if.end
@@ -200,13 +200,13 @@ define i32 @combine_lt_gt_n5() #0 {
; CHECK-NOT: cmn
; CHECK: b.le
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp = icmp slt i32 %0, -5
br i1 %cmp, label %land.lhs.true, label %lor.lhs.false
land.lhs.true: ; preds = %entry
- %1 = load i32* @b, align 4
- %2 = load i32* @c, align 4
+ %1 = load i32, i32* @b, align 4
+ %2 = load i32, i32* @c, align 4
%cmp1 = icmp eq i32 %1, %2
br i1 %cmp1, label %return, label %if.end
@@ -215,8 +215,8 @@ lor.lhs.false: ; preds = %entry
br i1 %cmp2, label %land.lhs.true3, label %if.end
land.lhs.true3: ; preds = %lor.lhs.false
- %3 = load i32* @b, align 4
- %4 = load i32* @d, align 4
+ %3 = load i32, i32* @b, align 4
+ %4 = load i32, i32* @d, align 4
%cmp4 = icmp eq i32 %3, %4
br i1 %cmp4, label %return, label %if.end
@@ -238,17 +238,17 @@ declare %struct.Struct* @Update(%struct.Struct*) #1
define void @combine_non_adjacent_cmp_br(%struct.Struct* nocapture readonly %hdCall) #0 {
entry:
%size = getelementptr inbounds %struct.Struct, %struct.Struct* %hdCall, i64 0, i32 0
- %0 = load i64* %size, align 8
+ %0 = load i64, i64* %size, align 8
br label %land.rhs
land.rhs:
%rp.06 = phi i64 [ %0, %entry ], [ %sub, %while.body ]
- %1 = load i64* inttoptr (i64 24 to i64*), align 8
+ %1 = load i64, i64* inttoptr (i64 24 to i64*), align 8
%cmp2 = icmp sgt i64 %1, 0
br i1 %cmp2, label %while.body, label %while.end
while.body:
- %2 = load %struct.Struct** @glob, align 8
+ %2 = load %struct.Struct*, %struct.Struct** @glob, align 8
%call = tail call %struct.Struct* @Update(%struct.Struct* %2) #2
%sub = add nsw i64 %rp.06, -2
%cmp = icmp slt i64 %0, %rp.06
@@ -268,7 +268,7 @@ define i32 @do_nothing_if_resultant_opcodes_would_differ() #0 {
; CHECK: cmp
; CHECK: b.gt
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp4 = icmp slt i32 %0, -1
br i1 %cmp4, label %while.body.preheader, label %while.end
@@ -283,7 +283,7 @@ while.body: ; preds = %while.body, %while.
br i1 %cmp, label %while.body, label %while.cond.while.end_crit_edge
while.cond.while.end_crit_edge: ; preds = %while.body
- %.pre = load i32* @a, align 4
+ %.pre = load i32, i32* @a, align 4
br label %while.end
while.end: ; preds = %while.cond.while.end_crit_edge, %entry
@@ -292,8 +292,8 @@ while.end: ; preds = %while.cond.while.en
br i1 %cmp1, label %land.lhs.true, label %if.end
land.lhs.true: ; preds = %while.end
- %2 = load i32* @b, align 4
- %3 = load i32* @d, align 4
+ %2 = load i32, i32* @b, align 4
+ %3 = load i32, i32* @d, align 4
%cmp2 = icmp eq i32 %2, %3
br i1 %cmp2, label %return, label %if.end
@@ -312,7 +312,7 @@ define i32 @do_nothing_if_compares_can_not_be_adjusted_to_each_other() #0 {
; CHECK: cmn
; CHECK: b.lt
entry:
- %0 = load i32* @a, align 4
+ %0 = load i32, i32* @a, align 4
%cmp4 = icmp slt i32 %0, 1
br i1 %cmp4, label %while.body.preheader, label %while.end
@@ -330,13 +330,13 @@ while.end.loopexit: ; preds = %while.body
br label %while.end
while.end: ; preds = %while.end.loopexit, %entry
- %1 = load i32* @c, align 4
+ %1 = load i32, i32* @c, align 4
%cmp1 = icmp sgt i32 %1, -3
br i1 %cmp1, label %land.lhs.true, label %if.end
land.lhs.true: ; preds = %while.end
- %2 = load i32* @b, align 4
- %3 = load i32* @d, align 4
+ %2 = load i32, i32* @b, align 4
+ %3 = load i32, i32* @d, align 4
%cmp2 = icmp eq i32 %2, %3
br i1 %cmp2, label %return, label %if.end
@@ -375,7 +375,7 @@ entry:
land.lhs.true: ; preds = %entry
%arrayidx = getelementptr inbounds i8*, i8** %argv, i64 1
- %0 = load i8** %arrayidx, align 8
+ %0 = load i8*, i8** %arrayidx, align 8
%cmp1 = icmp eq i8* %0, null
br i1 %cmp1, label %if.end, label %return