mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
f18a3c417c
Recommitting r329283, third time lucky... If the SRL node is only used by an AND, we may be able to set the ExtVT to the width of the mask, making the AND redundant. To support this, another check has been added in isLegalNarrowLoad which queries whether the load is valid. Differential Revision: https://reviews.llvm.org/D41350 llvm-svn: 329551
19 lines
595 B
LLVM
19 lines
595 B
LLVM
; RUN: llc -mtriple=powerpc64-unknown-unknown %s -o - | FileCheck %s
|
|
|
|
; CHECK-LABEL: trunc_srl_load
|
|
; CHECK-NOT: lhz 4, 4(0)
|
|
; CHECK: lhz 4, 2(0)
|
|
define dso_local fastcc void @trunc_srl_load(i32 zeroext %AttrArgNo) {
|
|
entry:
|
|
%bf.load.i = load i64, i64* null, align 8
|
|
%bf.lshr.i = lshr i64 %bf.load.i, 32
|
|
%0 = trunc i64 %bf.lshr.i to i32
|
|
%bf.cast.i = and i32 %0, 65535
|
|
%cmp.i = icmp ugt i32 %bf.cast.i, %AttrArgNo
|
|
br i1 %cmp.i, label %exit, label %cond.false
|
|
exit: ; preds = %entry
|
|
unreachable
|
|
cond.false: ; preds = %entry
|
|
unreachable
|
|
}
|