summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-11-30 18:49:56 +0000
committerSanjay Patel <spatel@rotateright.com>2016-11-30 18:49:56 +0000
commitc41d0c8a9b73eb844776b29328e3e2f63234a2a6 (patch)
treee0ead4094ecb709110b4c07d218314f2519fa9ed /llvm/test
parent7b75e3266c868ea6f9fa0783944e0f43d5ced2a3 (diff)
downloadbcm5719-llvm-c41d0c8a9b73eb844776b29328e3e2f63234a2a6.tar.gz
bcm5719-llvm-c41d0c8a9b73eb844776b29328e3e2f63234a2a6.zip
[InstCombine] update test to use FileCheck and auto-generate checks; NFC
llvm-svn: 288261
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/narrow.ll29
1 files changed, 15 insertions, 14 deletions
diff --git a/llvm/test/Transforms/InstCombine/narrow.ll b/llvm/test/Transforms/InstCombine/narrow.ll
index 5dd13a09662..7416568f586 100644
--- a/llvm/test/Transforms/InstCombine/narrow.ll
+++ b/llvm/test/Transforms/InstCombine/narrow.ll
@@ -1,18 +1,19 @@
-; This file contains various testcases that check to see that instcombine
-; is narrowing computations when possible.
-; RUN: opt < %s -instcombine -S | \
-; RUN: grep "ret i1 false"
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
+; Eliminating the casts in this testcase (by narrowing the AND operation)
+; allows instcombine to realize the function always returns false.
-; test1 - Eliminating the casts in this testcase (by narrowing the AND
-; operation) allows instcombine to realize the function always returns false.
-;
define i1 @test1(i32 %A, i32 %B) {
- %C1 = icmp slt i32 %A, %B ; <i1> [#uses=1]
- %ELIM1 = zext i1 %C1 to i32 ; <i32> [#uses=1]
- %C2 = icmp sgt i32 %A, %B ; <i1> [#uses=1]
- %ELIM2 = zext i1 %C2 to i32 ; <i32> [#uses=1]
- %C3 = and i32 %ELIM1, %ELIM2 ; <i32> [#uses=1]
- %ELIM3 = trunc i32 %C3 to i1 ; <i1> [#uses=1]
- ret i1 %ELIM3
+; CHECK-LABEL: @test1(
+; CHECK-NEXT: ret i1 false
+;
+ %C1 = icmp slt i32 %A, %B
+ %ELIM1 = zext i1 %C1 to i32
+ %C2 = icmp sgt i32 %A, %B
+ %ELIM2 = zext i1 %C2 to i32
+ %C3 = and i32 %ELIM1, %ELIM2
+ %ELIM3 = trunc i32 %C3 to i1
+ ret i1 %ELIM3
}
OpenPOWER on IntegriCloud