| Issue |
181650
|
| Summary |
[DAG] isKnownToBeAPowerOfTwo - improve ISD::SHL handling
|
| Labels |
good first issue,
llvm:SelectionDAG
|
| Assignees |
|
| Reporter |
RKSimon
|
https://github.com/RKSimon/llvm-project/blob/20aff2085c358d3e112b245494161ddb9ffe0410/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L4712-L4721
- [ ] The isConstOrConstSplat == 1 check can be improved by passing in the DemandedElts argument
- [ ] The fallback test should be refactored to check `OrZero || isKnownNeverZero` first and then call isKnownToBeAPowerOfTwo, with DemandedElts + OrZero arg passthrough
The actual changes are trivial, but this will require test coverage as well - these might be possible by extending existing DAG tests, else maybe add unit tests like we did in https://github.com/llvm/llvm-project/pull/181485
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs