summaryrefslogtreecommitdiff
path: root/test/Transforms/InstSimplify/reassociate.ll
diff options
context:
space:
mode:
authorStephen Lin <stephenwlin@gmail.com>2013-07-14 01:42:54 +0000
committerStephen Lin <stephenwlin@gmail.com>2013-07-14 01:42:54 +0000
commit39f4e8d9cce22b60a3417a5f17c847fa5b1daebf (patch)
tree7fed202a2c2c7866f60344b6388e0d3bd98cb14c /test/Transforms/InstSimplify/reassociate.ll
parent82e539d037a33f968e4a5476d3d471e1112f8ab2 (diff)
downloadllvm-39f4e8d9cce22b60a3417a5f17c847fa5b1daebf.tar.gz
llvm-39f4e8d9cce22b60a3417a5f17c847fa5b1daebf.tar.bz2
llvm-39f4e8d9cce22b60a3417a5f17c847fa5b1daebf.tar.xz
Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change.
This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstSimplify/reassociate.ll')
-rw-r--r--test/Transforms/InstSimplify/reassociate.ll42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/Transforms/InstSimplify/reassociate.ll b/test/Transforms/InstSimplify/reassociate.ll
index e659e6f42c..d44f7155ff 100644
--- a/test/Transforms/InstSimplify/reassociate.ll
+++ b/test/Transforms/InstSimplify/reassociate.ll
@@ -1,7 +1,7 @@
; RUN: opt < %s -instsimplify -S | FileCheck %s
define i32 @add1(i32 %x) {
-; CHECK: @add1
+; CHECK-LABEL: @add1(
; (X + -1) + 1 -> X
%l = add i32 %x, -1
%r = add i32 %l, 1
@@ -10,7 +10,7 @@ define i32 @add1(i32 %x) {
}
define i32 @and1(i32 %x, i32 %y) {
-; CHECK: @and1
+; CHECK-LABEL: @and1(
; (X & Y) & X -> X & Y
%l = and i32 %x, %y
%r = and i32 %l, %x
@@ -19,7 +19,7 @@ define i32 @and1(i32 %x, i32 %y) {
}
define i32 @and2(i32 %x, i32 %y) {
-; CHECK: @and2
+; CHECK-LABEL: @and2(
; X & (X & Y) -> X & Y
%r = and i32 %x, %y
%l = and i32 %x, %r
@@ -28,7 +28,7 @@ define i32 @and2(i32 %x, i32 %y) {
}
define i32 @or1(i32 %x, i32 %y) {
-; CHECK: @or1
+; CHECK-LABEL: @or1(
; (X | Y) | X -> X | Y
%l = or i32 %x, %y
%r = or i32 %l, %x
@@ -37,7 +37,7 @@ define i32 @or1(i32 %x, i32 %y) {
}
define i32 @or2(i32 %x, i32 %y) {
-; CHECK: @or2
+; CHECK-LABEL: @or2(
; X | (X | Y) -> X | Y
%r = or i32 %x, %y
%l = or i32 %x, %r
@@ -46,7 +46,7 @@ define i32 @or2(i32 %x, i32 %y) {
}
define i32 @xor1(i32 %x, i32 %y) {
-; CHECK: @xor1
+; CHECK-LABEL: @xor1(
; (X ^ Y) ^ X = Y
%l = xor i32 %x, %y
%r = xor i32 %l, %x
@@ -55,7 +55,7 @@ define i32 @xor1(i32 %x, i32 %y) {
}
define i32 @xor2(i32 %x, i32 %y) {
-; CHECK: @xor2
+; CHECK-LABEL: @xor2(
; X ^ (X ^ Y) = Y
%r = xor i32 %x, %y
%l = xor i32 %x, %r
@@ -64,7 +64,7 @@ define i32 @xor2(i32 %x, i32 %y) {
}
define i32 @sub1(i32 %x, i32 %y) {
-; CHECK: @sub1
+; CHECK-LABEL: @sub1(
%d = sub i32 %x, %y
%r = sub i32 %x, %d
ret i32 %r
@@ -72,7 +72,7 @@ define i32 @sub1(i32 %x, i32 %y) {
}
define i32 @sub2(i32 %x) {
-; CHECK: @sub2
+; CHECK-LABEL: @sub2(
; X - (X + 1) -> -1
%xp1 = add i32 %x, 1
%r = sub i32 %x, %xp1
@@ -81,7 +81,7 @@ define i32 @sub2(i32 %x) {
}
define i32 @sub3(i32 %x, i32 %y) {
-; CHECK: @sub3
+; CHECK-LABEL: @sub3(
; ((X + 1) + Y) - (Y + 1) -> X
%xp1 = add i32 %x, 1
%lhs = add i32 %xp1, %y
@@ -92,7 +92,7 @@ define i32 @sub3(i32 %x, i32 %y) {
}
define i32 @sdiv1(i32 %x, i32 %y) {
-; CHECK: @sdiv1
+; CHECK-LABEL: @sdiv1(
; (no overflow X * Y) / Y -> X
%mul = mul nsw i32 %x, %y
%r = sdiv i32 %mul, %y
@@ -101,7 +101,7 @@ define i32 @sdiv1(i32 %x, i32 %y) {
}
define i32 @sdiv2(i32 %x, i32 %y) {
-; CHECK: @sdiv2
+; CHECK-LABEL: @sdiv2(
; (((X / Y) * Y) / Y) -> X / Y
%div = sdiv i32 %x, %y
%mul = mul i32 %div, %y
@@ -111,7 +111,7 @@ define i32 @sdiv2(i32 %x, i32 %y) {
}
define i32 @sdiv3(i32 %x, i32 %y) {
-; CHECK: @sdiv3
+; CHECK-LABEL: @sdiv3(
; (X rem Y) / Y -> 0
%rem = srem i32 %x, %y
%div = sdiv i32 %rem, %y
@@ -120,7 +120,7 @@ define i32 @sdiv3(i32 %x, i32 %y) {
}
define i32 @sdiv4(i32 %x, i32 %y) {
-; CHECK: @sdiv4
+; CHECK-LABEL: @sdiv4(
; (X / Y) * Y -> X if the division is exact
%div = sdiv exact i32 %x, %y
%mul = mul i32 %div, %y
@@ -129,7 +129,7 @@ define i32 @sdiv4(i32 %x, i32 %y) {
}
define i32 @sdiv5(i32 %x, i32 %y) {
-; CHECK: @sdiv5
+; CHECK-LABEL: @sdiv5(
; Y * (X / Y) -> X if the division is exact
%div = sdiv exact i32 %x, %y
%mul = mul i32 %y, %div
@@ -139,7 +139,7 @@ define i32 @sdiv5(i32 %x, i32 %y) {
define i32 @udiv1(i32 %x, i32 %y) {
-; CHECK: @udiv1
+; CHECK-LABEL: @udiv1(
; (no overflow X * Y) / Y -> X
%mul = mul nuw i32 %x, %y
%r = udiv i32 %mul, %y
@@ -148,7 +148,7 @@ define i32 @udiv1(i32 %x, i32 %y) {
}
define i32 @udiv2(i32 %x, i32 %y) {
-; CHECK: @udiv2
+; CHECK-LABEL: @udiv2(
; (((X / Y) * Y) / Y) -> X / Y
%div = udiv i32 %x, %y
%mul = mul i32 %div, %y
@@ -158,7 +158,7 @@ define i32 @udiv2(i32 %x, i32 %y) {
}
define i32 @udiv3(i32 %x, i32 %y) {
-; CHECK: @udiv3
+; CHECK-LABEL: @udiv3(
; (X rem Y) / Y -> 0
%rem = urem i32 %x, %y
%div = udiv i32 %rem, %y
@@ -167,7 +167,7 @@ define i32 @udiv3(i32 %x, i32 %y) {
}
define i32 @udiv4(i32 %x, i32 %y) {
-; CHECK: @udiv4
+; CHECK-LABEL: @udiv4(
; (X / Y) * Y -> X if the division is exact
%div = udiv exact i32 %x, %y
%mul = mul i32 %div, %y
@@ -176,7 +176,7 @@ define i32 @udiv4(i32 %x, i32 %y) {
}
define i32 @udiv5(i32 %x, i32 %y) {
-; CHECK: @udiv5
+; CHECK-LABEL: @udiv5(
; Y * (X / Y) -> X if the division is exact
%div = udiv exact i32 %x, %y
%mul = mul i32 %y, %div
@@ -185,7 +185,7 @@ define i32 @udiv5(i32 %x, i32 %y) {
}
define i16 @trunc1(i32 %x) {
-; CHECK: @trunc1
+; CHECK-LABEL: @trunc1(
%y = add i32 %x, 1
%tx = trunc i32 %x to i16
%ty = trunc i32 %y to i16