canWidenShuffleElements can do a better job if given a mask with ZeroableElements info. Apparently, ZeroableElements was being only used to identify AllZero candidates, but possibly we could plug it into more shuffle matchers.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Target/X86/X86ISelLowering.cpp | ||
|---|---|---|
| 30 | ISD::isBuildVectorAllZeros allows undef elements (as long as it isn't all undefs) - should we test for a splat build vector of zero and check that we have no undefs at all? | |
| lib/Target/X86/X86ISelLowering.cpp | ||
|---|---|---|
| 30 | What would be the benefit of that? I mean, undefs can be zeroed if profitable. | |
| lib/Target/X86/X86ISelLowering.cpp | ||
|---|---|---|
| 35 | APInt Undefs = APInt::getAllOnesValue(NewNumElts); | |
| 36 | Are there any cases where the zero entry came from V1 that could cause a problem? | |
| 37 | APInt::getNullValue(NewEltVT.getSizeInBits()) | |
| 40 | i > NewNumElts can't ever be true? And anyway, we expect the zero to have come from V2. | |
- Rebase
- Simplify the creation of the shuffle by only modifying the widened mask to take all zeros from the all-zero operand.
ISD::isBuildVectorAllZeros allows undef elements (as long as it isn't all undefs) - should we test for a splat build vector of zero and check that we have no undefs at all?