Constant folding will fold these down to simple constants (or at least, expressions that don't involve a GEP). We don't need heroics to try to optimize the form of the expression before that happens.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I can’t say much about the code change itself, but it does indeed fix the build failure I was seeing, thanks!
Comment Actions
LGTM -- the target-dependent folder is going to reduce these to constants, I don't see any value in trying very hard to optimize them in the target-indepenedent folder.
Note that you need to adjust clang codegen tests as well.
llvm/test/Other/constant-fold-gep.ll | ||
---|---|---|
50 | Outdated comment. |
Comment Actions
Just committed 6eb2ffba to fix a couple regression tests.
Seems low-risk to cherry-pick to 13.x.
Outdated comment.