Baseline tests showing current optimizer can't simplify GEP (GEP (GEP p C1) I1) C2 where C1 and C2 are constants
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll | ||
---|---|---|
277 | It's not clear to me that this test is providing coverage for the intended constraint in the other patch. Should we add a simplify for any gep like %3? |
llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll | ||
---|---|---|
277 | GEP with zero offset is simplified away by visitGEPOfGEP regardless what the preceding GEP is, so there is no way to keep it in the output |
llvm/test/Transforms/InstCombine/gep-merge-constant-indices.ll | ||
---|---|---|
277 | Then do we really need this test? Even with typed pointers, we could do this transform of a single GEP: To be clear, I don't think it has to delay this patch or D137212. I'm just curious if we are missing a more basic transform. |
It's not clear to me that this test is providing coverage for the intended constraint in the other patch.
Should we add a simplify for any gep like %3?
https://alive2.llvm.org/ce/z/w89_Y5