Skip to content

Commit 1d76bf9

Browse files
committed
[SimplifyCFG] Remove unnecessary content in ForwardSwitchConditionToPHI.ll (NFC)
Also rename `t` to forward_multiple`.
1 parent aede380 commit 1d76bf9

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@
22
; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -forward-switch-cond=false -switch-range-to-icmp -S | FileCheck %s --check-prefix=NO_FWD
33
; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -forward-switch-cond=true -switch-range-to-icmp -S | FileCheck %s --check-prefix=FWD
44

5-
; RUN: opt < %s -passes='simplifycfg<no-forward-switch-cond;switch-range-to-icmp>' -S | FileCheck %s --check-prefix=NO_FWD
6-
; RUN: opt < %s -passes='simplifycfg<forward-switch-cond;switch-range-to-icmp>' -S | FileCheck %s --check-prefix=FWD
7-
85
; PR10131
96

10-
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"
11-
target triple = "i386-pc-linux-gnu"
12-
13-
define i32 @t(i32 %m) nounwind readnone {
14-
; NO_FWD-LABEL: @t(
7+
define i32 @forward_multiple(i32 %m) {
8+
; NO_FWD-LABEL: @forward_multiple(
159
; NO_FWD-NEXT: entry:
1610
; NO_FWD-NEXT: switch i32 [[M:%.*]], label [[SW_BB4:%.*]] [
1711
; NO_FWD-NEXT: i32 0, label [[RETURN:%.*]]
@@ -31,7 +25,7 @@ define i32 @t(i32 %m) nounwind readnone {
3125
; NO_FWD-NEXT: [[RETVAL_0:%.*]] = phi i32 [ 4, [[SW_BB4]] ], [ 3, [[SW_BB3]] ], [ 2, [[SW_BB2]] ], [ 1, [[SW_BB1]] ], [ 0, [[ENTRY:%.*]] ]
3226
; NO_FWD-NEXT: ret i32 [[RETVAL_0]]
3327
;
34-
; FWD-LABEL: @t(
28+
; FWD-LABEL: @forward_multiple(
3529
; FWD-NEXT: entry:
3630
; FWD-NEXT: [[SWITCH:%.*]] = icmp ult i32 [[M:%.*]], 4
3731
; FWD-NEXT: [[SPEC_SELECT:%.*]] = select i1 [[SWITCH]], i32 [[M]], i32 4

0 commit comments

Comments
 (0)