While this is normally non-canonical IR, this pattern can appear during SDAG lowering if the add is actually a getelementptr, as illustrated in @test_ptr. This pattern comes up when doing provenance-aware high-bit pointer tagging.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
3061 | Does the equivilent ever come up for sub? |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
3061 | I don't think so. You'd need something like gep(x, sub(0, mul(x, C))) for that, and that would be canonicalized to gep(x, mul(x, -C)) rather than becoming sub(x, mul(x, C)) in the backend. |
Does the equivilent ever come up for sub?