[llvm] r288261 - [InstCombine] update test to use FileCheck and auto-generate checks; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 30 10:49:56 PST 2016
Author: spatel
Date: Wed Nov 30 12:49:56 2016
New Revision: 288261
URL: http://llvm.org/viewvc/llvm-project?rev=288261&view=rev
Log:
[InstCombine] update test to use FileCheck and auto-generate checks; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/narrow.ll
Modified: llvm/trunk/test/Transforms/InstCombine/narrow.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/narrow.ll?rev=288261&r1=288260&r2=288261&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/narrow.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/narrow.ll Wed Nov 30 12:49:56 2016
@@ -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
}
More information about the llvm-commits
mailing list