[llvm] r316006 - [SimplifyCFG] update test to use auto-generated FileCheck asserts; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 08:50:47 PDT 2017
Author: spatel
Date: Tue Oct 17 08:50:47 2017
New Revision: 316006
URL: http://llvm.org/viewvc/llvm-project?rev=316006&view=rev
Log:
[SimplifyCFG] update test to use auto-generated FileCheck asserts; NFC
Modified:
llvm/trunk/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
Modified: llvm/trunk/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll?rev=316006&r1=316005&r2=316006&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll (original)
+++ llvm/trunk/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll Tue Oct 17 08:50:47 2017
@@ -1,18 +1,24 @@
-; RUN: opt < %s -simplifycfg -S | \
-; RUN: not grep " switch"
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -simplifycfg -S | FileCheck %s
+
; PR10131
-; ModuleID = '<stdin>'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i386-pc-linux-gnu"
define i32 @t(i32 %m) nounwind readnone {
+; CHECK-LABEL: @t(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[SWITCH:%.*]] = icmp ult i32 [[M:%.*]], 4
+; CHECK-NEXT: [[M_:%.*]] = select i1 [[SWITCH]], i32 [[M]], i32 4
+; CHECK-NEXT: ret i32 [[M_]]
+;
entry:
switch i32 %m, label %sw.bb4 [
- i32 0, label %sw.bb0
- i32 1, label %sw.bb1
- i32 2, label %sw.bb2
- i32 3, label %sw.bb3
+ i32 0, label %sw.bb0
+ i32 1, label %sw.bb1
+ i32 2, label %sw.bb2
+ i32 3, label %sw.bb3
]
sw.bb0: ; preds = %entry
@@ -34,3 +40,4 @@ return:
%retval.0 = phi i32 [ 4, %sw.bb4 ], [ 3, %sw.bb3 ], [ 2, %sw.bb2 ], [ 1, %sw.bb1 ], [ 0, %sw.bb0 ]
ret i32 %retval.0
}
+
More information about the llvm-commits
mailing list