2009-10-12 14:14:06 +08:00
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
2006-04-29 06:17:20 +08:00
|
|
|
|
|
|
|
; This cannot be turned into a sign extending cast!
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define i64 @test(i64 %X) {
|
|
|
|
%Y = shl i64 %X, 16 ; <i64> [#uses=1]
|
2009-10-12 14:14:06 +08:00
|
|
|
; CHECK: %Y = shl i64 %X, 16
|
2008-03-01 17:15:35 +08:00
|
|
|
%Z = ashr i64 %Y, 16 ; <i64> [#uses=1]
|
2011-02-10 13:36:31 +08:00
|
|
|
; CHECK: %Z = ashr exact i64 %Y, 16
|
2008-03-01 17:15:35 +08:00
|
|
|
ret i64 %Z
|
2009-10-12 14:14:06 +08:00
|
|
|
; CHECK: ret i64 %Z
|
2006-04-29 06:17:20 +08:00
|
|
|
}
|
2008-03-01 17:15:35 +08:00
|
|
|
|