[PATCH] D85533: [InstCombine] Optimize select(freeze(icmp eq/ne x, y), x, y)

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 09:53:46 PDT 2020


aqjune 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);
----------------
nikic wrote:
> Why is it necessary to freeze the result? Alive accepts this without the freeze as well: https://alive2.llvm.org/ce/z/X49hNE
You are correct - freeze isn't needed.
I'll remove it.


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