mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
7a6aa1a391
exact/nsw/nuw shifts and have instcombine infer them when it can prove that the relevant properties are true for a given shift without them. Also, a variety of refactoring to use the new patternmatch logic thrown in for good luck. I believe that this takes care of a bunch of related code quality issues attached to PR8862. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125267 91177308-0d34-0410-b5e6-96231b3b80d8
14 lines
351 B
LLVM
14 lines
351 B
LLVM
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
; This cannot be turned into a sign extending cast!
|
|
|
|
define i64 @test(i64 %X) {
|
|
%Y = shl i64 %X, 16 ; <i64> [#uses=1]
|
|
; CHECK: %Y = shl i64 %X, 16
|
|
%Z = ashr i64 %Y, 16 ; <i64> [#uses=1]
|
|
; CHECK: %Z = ashr exact i64 %Y, 16
|
|
ret i64 %Z
|
|
; CHECK: ret i64 %Z
|
|
}
|
|
|