[llvm] 1d76bf9 - [SimplifyCFG] Remove unnecessary content in `ForwardSwitchConditionToPHI.ll` (NFC)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 07:01:47 PDT 2024


Author: DianQK
Date: 2024-06-18T22:01:36+08:00
New Revision: 1d76bf900b1671eec88b414e83fe9a4df99fdb07

URL: https://github.com/llvm/llvm-project/commit/1d76bf900b1671eec88b414e83fe9a4df99fdb07
DIFF: https://github.com/llvm/llvm-project/commit/1d76bf900b1671eec88b414e83fe9a4df99fdb07.diff

LOG: [SimplifyCFG] Remove unnecessary content in `ForwardSwitchConditionToPHI.ll` (NFC)

Also rename `t` to forward_multiple`.

Added: 
    

Modified: 
    llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll b/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
index d6185a1b874f5..5c266f4867398 100644
--- a/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
+++ b/llvm/test/Transforms/SimplifyCFG/ForwardSwitchConditionToPHI.ll
@@ -2,16 +2,10 @@
 ; 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
 ; 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
 
-; RUN: opt < %s -passes='simplifycfg<no-forward-switch-cond;switch-range-to-icmp>' -S | FileCheck %s --check-prefix=NO_FWD
-; RUN: opt < %s -passes='simplifycfg<forward-switch-cond;switch-range-to-icmp>' -S | FileCheck %s --check-prefix=FWD
-
 ; PR10131
 
-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 {
-; NO_FWD-LABEL: @t(
+define i32 @forward_multiple(i32 %m) {
+; NO_FWD-LABEL: @forward_multiple(
 ; NO_FWD-NEXT:  entry:
 ; NO_FWD-NEXT:    switch i32 [[M:%.*]], label [[SW_BB4:%.*]] [
 ; NO_FWD-NEXT:      i32 0, label [[RETURN:%.*]]
@@ -31,7 +25,7 @@ define i32 @t(i32 %m) nounwind readnone {
 ; NO_FWD-NEXT:    [[RETVAL_0:%.*]] = phi i32 [ 4, [[SW_BB4]] ], [ 3, [[SW_BB3]] ], [ 2, [[SW_BB2]] ], [ 1, [[SW_BB1]] ], [ 0, [[ENTRY:%.*]] ]
 ; NO_FWD-NEXT:    ret i32 [[RETVAL_0]]
 ;
-; FWD-LABEL: @t(
+; FWD-LABEL: @forward_multiple(
 ; FWD-NEXT:  entry:
 ; FWD-NEXT:    [[SWITCH:%.*]] = icmp ult i32 [[M:%.*]], 4
 ; FWD-NEXT:    [[SPEC_SELECT:%.*]] = select i1 [[SWITCH]], i32 [[M]], i32 4


        


More information about the llvm-commits mailing list