blob: ceb8deb6775f030d8babb486e15b0e4698a844e8 [file] [log] [blame]
Reid Spencer6c38f0b2006-11-27 01:05:10 +00001; Tests to make sure elimination of casts is working correctly
Tanya Lattner5640bd12008-03-01 09:15:35 +00002; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
Reid Spencer91948d42007-04-14 20:13:02 +00003; RUN: notcast {} {%c1.*}
Reid Spencer6c38f0b2006-11-27 01:05:10 +00004
Tanya Lattner5640bd12008-03-01 09:15:35 +00005define i64 @test_sext_zext(i16 %A) {
6 %c1 = zext i16 %A to i32 ; <i32> [#uses=1]
7 %c2 = sext i32 %c1 to i64 ; <i64> [#uses=1]
8 ret i64 %c2
Reid Spencer6c38f0b2006-11-27 01:05:10 +00009}
Tanya Lattner5640bd12008-03-01 09:15:35 +000010