view test/Transforms/InstCombine/2007-03-19-BadTruncChangePR1261.ll @ 83:60c9769439b8 LLVM3.7

LLVM 3.7
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Wed, 18 Feb 2015 14:55:36 +0900
parents 95c75e76d11b
children
line wrap: on
line source

; RUN: opt < %s -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
}