[PATCH] D75807: [InstCombine] fold gep-of-select-of-constants (PR45084)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 14:03:34 PDT 2020
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:1829
+ Value *NewFalseC = IsInBounds ? Builder.CreateInBoundsGEP(FalseC, IndexC)
+ : Builder.CreateGEP(FalseC, IndexC);
+ return SelectInst::Create(Cond, NewTrueC, NewFalseC, "", nullptr, Sel);
----------------
Surprised that IRBuilder has no overloads accepting bool...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75807/new/
https://reviews.llvm.org/D75807
More information about the llvm-commits
mailing list