aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/LoadVN/casts.ll
blob: 3749bee3663a78550d7f1659c23475765bca5f76 (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} | count 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
}