blob: 7835fe690b2de21e899f7938a2ef9b3465b93b3d [file] [log] [blame]
Reid Spencer6c38f0b2006-11-27 01:05:10 +00001; Tests to make sure elimination of casts is working correctly
Reid Spencerd0e30dc2006-12-02 04:23:10 +00002; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
3; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast '' '%c1.*'
Reid Spencer6c38f0b2006-11-27 01:05:10 +00004
5long %test_sext_zext(short %A) {
6 %c1 = zext short %A to uint
7 %c2 = sext uint %c1 to long
8 ret long %c2
9}