mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
Fix a bug in FindMemType. When widening vector loads, use a wider memory type
only if the number of packed elements is a power of two. Bug found in Duncan's testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83f9467436
commit
00404bfaef
@ -2164,6 +2164,7 @@ static EVT FindMemType(SelectionDAG& DAG, const TargetLowering &TLI,
|
||||
if (MemVT.getSizeInBits() <= WidenEltWidth)
|
||||
break;
|
||||
if (TLI.isTypeLegal(MemVT) && (WidenWidth % MemVTWidth) == 0 &&
|
||||
isPowerOf2_32(WidenWidth / MemVTWidth) &&
|
||||
(MemVTWidth <= Width ||
|
||||
(Align!=0 && MemVTWidth<=AlignInBits && MemVTWidth<=Width+WidenEx))) {
|
||||
RetVT = MemVT;
|
||||
@ -2179,6 +2180,7 @@ static EVT FindMemType(SelectionDAG& DAG, const TargetLowering &TLI,
|
||||
unsigned MemVTWidth = MemVT.getSizeInBits();
|
||||
if (TLI.isTypeLegal(MemVT) && WidenEltVT == MemVT.getVectorElementType() &&
|
||||
(WidenWidth % MemVTWidth) == 0 &&
|
||||
isPowerOf2_32(WidenWidth / MemVTWidth) &&
|
||||
(MemVTWidth <= Width ||
|
||||
(Align!=0 && MemVTWidth<=AlignInBits && MemVTWidth<=Width+WidenEx))) {
|
||||
if (RetVT.getSizeInBits() < MemVTWidth || MemVT == WidenVT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user