Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; 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 | |||||
6 | declare void %external(int) | ||||
7 | |||||
8 | int %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 | } |