aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ConstProp/2006-12-01-bool-casts.ll
blob: 2474132d355c68d11df7c451c04d1a9d000f12a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN:    grep {ret i32 -1}
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | \
; RUN:    grep {ret i32 1}

int %test1() {
  %A = sext bool true to int
  ret int %A
}

uint %test2() {
  %A = zext bool true to uint
  ret uint %A
}