xref: /llvm-project/llvm/test/Transforms/Inline/casts.ll (revision e5369823bc0655806469724335d0ca5a4c17d8c7)
1; RUN: opt < %s -passes=inline -S | FileCheck %s
2; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
3; RUN: opt < %s -passes='module-inline' -S | FileCheck %s
4
5define i32 @testByte(i8 %X) {
6entry:
7  %tmp = icmp ne i8 %X, 0
8  %tmp.i = zext i1 %tmp to i32
9  ret i32 %tmp.i
10}
11
12define i32 @main() {
13; CHECK-LABEL: define i32 @main()
14entry:
15  %rslt = call i32 @testByte(i8 123)
16; CHECK-NOT: call
17  ret i32 %rslt
18; CHECK: ret i32 1
19}
20