[PATCH] D38369: [InstSimplify] teach SimplifySelectInst() to fold more vector selects

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 11:26:59 PDT 2017


spatel added reviewers: majnemer, craig.topper.
spatel added inline comments.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:3585
+      if (Constant *CF = dyn_cast<Constant>(FalseVal))
+        return ConstantExpr::getSelect(CB, CT, CF);
     if (CB->isAllOnesValue())
----------------
I think we should use ConstantFoldSelectInstruction() here (to be more efficient?). That's the interface for other opcodes from what I can see in other parts of the file.


Repository:
  rL LLVM

https://reviews.llvm.org/D38369





More information about the llvm-commits mailing list