mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Calculate vector element size more directly for VINSERTF128/VEXTRACTF128 immediate handling. Also use MVT since this only called on legal types during pattern matching.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172797 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e6d8fa7d0b
commit
5141d97d3e
@ -4011,9 +4011,8 @@ bool X86::isVEXTRACTF128Index(SDNode *N) {
|
||||
uint64_t Index =
|
||||
cast<ConstantSDNode>(N->getOperand(1).getNode())->getZExtValue();
|
||||
|
||||
unsigned VL = N->getValueType(0).getVectorNumElements();
|
||||
unsigned VBits = N->getValueType(0).getSizeInBits();
|
||||
unsigned ElSize = VBits / VL;
|
||||
MVT VT = N->getValueType(0).getSimpleVT();
|
||||
unsigned ElSize = VT.getVectorElementType().getSizeInBits();
|
||||
bool Result = (Index * ElSize) % 128 == 0;
|
||||
|
||||
return Result;
|
||||
@ -4030,9 +4029,8 @@ bool X86::isVINSERTF128Index(SDNode *N) {
|
||||
uint64_t Index =
|
||||
cast<ConstantSDNode>(N->getOperand(2).getNode())->getZExtValue();
|
||||
|
||||
unsigned VL = N->getValueType(0).getVectorNumElements();
|
||||
unsigned VBits = N->getValueType(0).getSizeInBits();
|
||||
unsigned ElSize = VBits / VL;
|
||||
MVT VT = N->getValueType(0).getSimpleVT();
|
||||
unsigned ElSize = VT.getVectorElementType().getSizeInBits();
|
||||
bool Result = (Index * ElSize) % 128 == 0;
|
||||
|
||||
return Result;
|
||||
|
Loading…
Reference in New Issue
Block a user