2006-10-20 02:54:08 +08:00
|
|
|
; This test case is reduced from llvmAsmParser.cpp
|
|
|
|
; The optimizer should not remove the cast here.
|
2008-03-01 17:15:35 +08:00
|
|
|
; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \
|
2007-04-15 04:13:02 +08:00
|
|
|
; RUN: grep sext.*i32
|
2006-11-27 09:05:10 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
|
|
|
|
define i1 @test(i16 %X) {
|
|
|
|
%A = sext i16 %X to i32 ; <i32> [#uses=1]
|
|
|
|
%B = icmp ugt i32 %A, 1330 ; <i1> [#uses=1]
|
|
|
|
ret i1 %B
|
2006-10-20 02:54:08 +08:00
|
|
|
}
|
2008-03-01 17:15:35 +08:00
|
|
|
|