[PATCH] [DAGCombiner] Add support for FCEIL, FFLOOR and FTRUNC vector constant folding
Quentin Colombet
qcolombet at apple.com
Fri Apr 3 11:06:29 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2848
@@ -2847,2 +2847,3 @@
if (BuildVectorSDNode *BV = dyn_cast<BuildVectorSDNode>(Operand.getNode())) {
- if (BV->isConstant()) {
+ if (BV->isConstant() && VT.isVector()) {
+ EVT SVT = VT.getVectorElementType();
----------------
Naive question: Is it possible to have a BuildVector without a VT for a vector?
================
Comment at: test/CodeGen/X86/vec_floor.ll:228
@@ +227,2 @@
+ ret <4 x float> %t
+}
----------------
Could it be possible to add negative test when the conversion are not precise enough?
http://reviews.llvm.org/D8715
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list