[PATCH] D85533: [InstCombine] Optimize select(freeze(icmp eq/ne x, y), x, y)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 09:48:40 PDT 2020
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2543
+ auto *NewFr = Builder.CreateFreeze(Pred == ICmpInst::ICMP_EQ ?
+ FalseVal : TrueVal);
+ NewFr->takeName(&Sel);
----------------
Why is it necessary to freeze the result? Alive accepts this without the freeze as well: https://alive2.llvm.org/ce/z/X49hNE
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85533/new/
https://reviews.llvm.org/D85533
More information about the llvm-commits
mailing list