xref: /aosp_15_r20/external/llvm/test/Transforms/SCCP/switch.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt -S -sccp < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Make sure we always consider the default edge executable for a switch
4*9880d681SAndroid Build Coastguard Worker; with no cases.
5*9880d681SAndroid Build Coastguard Workerdeclare void @foo()
6*9880d681SAndroid Build Coastguard Workerdefine void @test1() {
7*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: define void @test1(
8*9880d681SAndroid Build Coastguard Worker; CHECK: call void @foo()
9*9880d681SAndroid Build Coastguard Worker  switch i32 undef, label %d []
10*9880d681SAndroid Build Coastguard Workerd:
11*9880d681SAndroid Build Coastguard Worker  call void @foo()
12*9880d681SAndroid Build Coastguard Worker  ret void
13*9880d681SAndroid Build Coastguard Worker}
14