xref: /aosp_15_r20/external/llvm/test/Transforms/ConstProp/2006-12-01-bool-casts.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1; RUN: opt < %s -constprop -S | \
2; RUN:    grep "ret i32 -1"
3; RUN: opt < %s -constprop -S | \
4; RUN:    grep "ret i32 1"
5
6define i32 @test1() {
7        %A = sext i1 true to i32                ; <i32> [#uses=1]
8        ret i32 %A
9}
10
11define i32 @test2() {
12        %A = zext i1 true to i32                ; <i32> [#uses=1]
13        ret i32 %A
14}
15
16