[PATCH] D34538: Handle ConstantExpr correctly in SelectionDAGBuilder

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 15:25:26 PDT 2017


efriedma added subscribers: llvm-commits, efriedma.
efriedma edited reviewers, added: efriedma; removed: llvm-commits.
efriedma added a comment.

Missing testcase... although, I'm not how you would write one.

Could we fix SelectionDAGBuilder::visit so this problem can't happen again?



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:3228
+  else if (const ConstantExpr *IV = dyn_cast<ConstantExpr>(&I))
+    Indices = IV->getIndices();
+
----------------
"else", instead of "else if"?


https://reviews.llvm.org/D34538





More information about the llvm-commits mailing list