xref: /aosp_15_r20/external/llvm/test/Integer/unreachable_bt.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3*9880d681SAndroid Build Coastguard Worker; RUN: diff %t1.ll %t2.ll
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdeclare void @bar()
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine i9 @foo() {  ;; Calling this function has undefined behavior
10*9880d681SAndroid Build Coastguard Worker	unreachable
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine double @xyz() {
14*9880d681SAndroid Build Coastguard Worker	call void @bar()
15*9880d681SAndroid Build Coastguard Worker	unreachable          ;; Bar must not return.
16*9880d681SAndroid Build Coastguard Worker}
17