blob: 3da4d573019381ce05940ce9bfc25f937675e505 [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 | \
4; RUN: grep {\[sz\]ext} | wc -l | grep 2
5
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}