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 | \ |
Dan Gohman | 8c89a50 | 2007-08-15 13:36:28 +0000 | [diff] [blame^] | 4 | ; RUN: grep {\[sz\]ext} | count 2 |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 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 | } |