bolt/deps/llvm-18.1.8/llvm/test/Transforms/InstCombine/2007-03-19-BadTruncChangePR1261.ll
2025-02-14 19:21:04 +01:00

10 lines
210 B
LLVM

; RUN: opt < %s -passes=instcombine -S | grep zext
; PR1261.
define i16 @test(i31 %zzz) {
%A = sext i31 %zzz to i32
%B = add i32 %A, 16384
%C = lshr i32 %B, 15
%D = trunc i32 %C to i16
ret i16 %D
}