summaryrefslogtreecommitdiff
path: root/test/Analysis/LoadVN/casts.ll
blob: 5dd3bc60ab387761d5f8465d2ee9fc6efe043f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; Check to make sure that Value Numbering doesn't merge casts of different
; flavors.
; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | \
; RUN: grep '[sz]ext' | wc -l | grep 2

declare void %external(int)

int %test_casts(short %x) {
  %a = sext short %x to int
  %b = zext short %x to int
  call void %external(int %a)
  ret int %b
}