mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[AArch64][GlobalISel] Don't form truncstores in postlegalizer-lowering for s128.
We don't support truncating s128 stores, so don't form them.
This commit is contained in:
parent
afd4fe3364
commit
c7647f3217
@ -959,7 +959,10 @@ static bool matchFormTruncstore(MachineInstr &MI, MachineRegisterInfo &MRI,
|
||||
if (MRI.getType(DstReg).isVector())
|
||||
return false;
|
||||
// Match a store of a truncate.
|
||||
return mi_match(DstReg, MRI, m_GTrunc(m_Reg(SrcReg)));
|
||||
if (!mi_match(DstReg, MRI, m_GTrunc(m_Reg(SrcReg))))
|
||||
return false;
|
||||
// Only form truncstores for value types of max 64b.
|
||||
return MRI.getType(SrcReg).getSizeInBits() <= 64;
|
||||
}
|
||||
|
||||
static bool applyFormTruncstore(MachineInstr &MI, MachineRegisterInfo &MRI,
|
||||
|
@ -32,3 +32,19 @@ body: |
|
||||
%trunc:_(<4 x s8>) = G_TRUNC %val
|
||||
G_STORE %trunc(<4 x s8>), %ptr(p0) :: (store (<4 x s8>))
|
||||
...
|
||||
---
|
||||
name: truncstore_too_large
|
||||
legalized: true
|
||||
body: |
|
||||
bb.0.entry:
|
||||
liveins: $x0
|
||||
; CHECK-LABEL: name: truncstore_too_large
|
||||
; CHECK: %ptr:_(p0) = COPY $x0
|
||||
; CHECK: %val:_(s128) = COPY $q0
|
||||
; CHECK: %trunc:_(s32) = G_TRUNC %val(s128)
|
||||
; CHECK: G_STORE %trunc(s32), %ptr(p0) :: (store (s32))
|
||||
%ptr:_(p0) = COPY $x0
|
||||
%val:_(s128) = COPY $q0
|
||||
%trunc:_(s32) = G_TRUNC %val
|
||||
G_STORE %trunc(s32), %ptr(p0) :: (store (s32))
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user