aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-10-26 22:52:03 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-10-26 22:52:03 +0000
commitd2d438e58da4d492d36b9f4b7e5eb917968a7964 (patch)
tree4420eeac3542dd9a10bc532c5d32110a97b1b8a0 /test/Transforms/InstCombine
parentd9ecd3108f32b33e38b5ba0ee3963062d6ecc115 (diff)
downloadexternal_llvm-d2d438e58da4d492d36b9f4b7e5eb917968a7964.zip
external_llvm-d2d438e58da4d492d36b9f4b7e5eb917968a7964.tar.gz
external_llvm-d2d438e58da4d492d36b9f4b7e5eb917968a7964.tar.bz2
Convert a few tests to FileCheck for PR5307.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/preserve-sminmax.ll12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/preserve-sminmax.ll b/test/Transforms/InstCombine/preserve-sminmax.ll
index dbfd56a..00232cc 100644
--- a/test/Transforms/InstCombine/preserve-sminmax.ll
+++ b/test/Transforms/InstCombine/preserve-sminmax.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine -S | grep { i32 \[%\]sd, \[\[:alnum:\]\]* \\?1\\>} | count 4
+; RUN: opt < %s -instcombine -S | FileCheck %s
; Instcombine normally would fold the sdiv into the comparison,
; making "icmp slt i32 %h, 2", but in this case the sdiv has
@@ -13,6 +13,11 @@ define i32 @foo(i32 %h) {
ret i32 %r
}
+; CHECK: %sd = sdiv i32 %h, 2
+; CHECK: %t = icmp slt i32 %sd, 1
+; CHECK: %r = select i1 %t, i32 %sd, i32 1
+; CHECK: ret i32 %r
+
define i32 @bar(i32 %h) {
%sd = sdiv i32 %h, 2
%t = icmp sgt i32 %sd, 1
@@ -20,3 +25,8 @@ define i32 @bar(i32 %h) {
ret i32 %r
}
+; CHECK: %sd = sdiv i32 %h, 2
+; CHECK: %t = icmp sgt i32 %sd, 1
+; CHECK: %r = select i1 %t, i32 %sd, i32 1
+; CHECK: ret i32 %r
+