| Issue |
177364
|
| Summary |
[X86] computeKnownBitsForTargetNode - extend X86ISD::BZHI handling
|
| Labels |
good first issue,
backend:X86
|
| Assignees |
|
| Reporter |
RKSimon
|
#177347 gives us basic handling for constant index masks, but we should be able to extend this to better use the knownbits of the src and mask:
- [ ] If the lower 8 bits of the mask is guaranteed to be greater than or equal to the bitwidth (`getMinValue.uge(BitWidth)`), then all the src knownbits are valid and can be returned
- [ ] If the mask is in range `getMaxValue.ult(BitWidth)` - then all src knownbits (ones and zeros) below minvalue will stay, and all src bits at/above max will be zero - in between only known src zero will remain (similar to what #177347 already does).
Supporting tests can be added to combine-bzhi.ll
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=bzhi&ig_expand=634,633,5,634
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs