[PATCH] D79217: Process gep (select ptr1, ptr2) in SROA
    Stanislav Mekhanoshin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu May 14 16:21:39 PDT 2020
    
    
  
rampitec marked an inline comment as done.
rampitec added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:3468
+    // Fold gep (select cond, ptr1, ptr2) => select cond, gep(ptr1), gep(ptr2)
+    if (SelectInst *Sel = dyn_cast<SelectInst>(GEPI.getPointerOperand())) {
+      LLVM_DEBUG(dbgs() << "  Rewriting gep(select) -> select(gep):"
----------------
arsenm wrote:
> Early exit if not select and reduce indentation
I will have to return this if anyway after D79218. There is one if for Select and one for PHI.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79217/new/
https://reviews.llvm.org/D79217
    
    
More information about the llvm-commits
mailing list