blob: 3749bee3663a78550d7f1659c23475765bca5f76 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Check to make sure that Value Numbering doesn't merge casts of different
2; flavors.
3; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | \
Dan Gohman8c89a502007-08-15 13:36:28 +00004; RUN: grep {\[sz\]ext} | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00005
6declare void %external(int)
7
8int %test_casts(short %x) {
9 %a = sext short %x to int
10 %b = zext short %x to int
11 call void %external(int %a)
12 ret int %b
13}