aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/ConstProp/2006-12-01-bool-casts.ll
blob: a2d6feb2609e6f2e7a60ba29c1514594e831b697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret int -1' &&
; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis | grep 'ret uint 1'

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

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