[PATCH] D38756: [x86] use an insert op to put one variable element into a constant of vectors

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 14:23:51 PDT 2017


efriedma added a comment.

> This doesn't happen with int constants...because int constants are legal but FP constants are not?

Yes, exactly.

We call LowerBUILD_VECTOR before we legalize the operands of a BUILD_VECTOR, so that shouldn't block this optimization.  But we don't recompute the topological ordering when you create new nodes, so legalization can happen in an unexpected order if you create illegal nodes (by, for example, calling getBuildVector()).


https://reviews.llvm.org/D38756





More information about the llvm-commits mailing list