Reid Spencer | 6c38f0b | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 1 | ; Tests to make sure elimination of casts is working correctly |
Reid Spencer | 91948d4 | 2007-04-14 20:13:02 +0000 | [diff] [blame^] | 2 | ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \ |
3 | ; RUN: notcast {} {%c1.*} | ||||
Reid Spencer | 6c38f0b | 2006-11-27 01:05:10 +0000 | [diff] [blame] | 4 | |
5 | long %test_sext_zext(short %A) { | ||||
6 | %c1 = zext short %A to uint | ||||
7 | %c2 = sext uint %c1 to long | ||||
8 | ret long %c2 | ||||
9 | } |