[PATCH] D48149: Expand constrained FP POWI
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 13:44:19 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp:1154
EltVT, Op.getOperand(j), Idx);
Opers.push_back(Oper);
}
----------------
Why couldn't we just detect that the type of Op.getOperand(j) is a scalar type and skip the extract? Then you could handle POWI in in this code without the separate function. Maybe with some asserts to ensure that type is vector everything but the last operand of POWI.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp:1192
+
+ Opers.push_back(Chain);
+ Opers.push_back(Base);
----------------
There's no reason for Opers to be a SmallVector.
You could just do
```
SDValue Opers[] = { Chain, Base, Power };
```
================
Comment at: test/CodeGen/X86/vector-constrained-fp-intrinsics.ll:337
declare <2 x double> @llvm.experimental.constrained.fdiv.v2f64(<2 x double>, <2 x double>, metadata, metadata)
declare <2 x double> @llvm.experimental.constrained.fmul.v2f64(<2 x double>, <2 x double>, metadata, metadata)
----------------
FMA is missing? I didn't catch it in the other patch.
================
Comment at: test/CodeGen/X86/vector-constrained-fp-intrinsics.ll:342
declare <2 x double> @llvm.experimental.constrained.sqrt.v2f64(<2 x double>, metadata, metadata)
declare <4 x double> @llvm.experimental.constrained.sqrt.v4f64(<4 x double>, metadata, metadata)
declare <2 x double> @llvm.experimental.constrained.pow.v2f64(<2 x double>, <2 x double>, metadata, metadata)
----------------
sqrt.v4f64 doesn't appear to be used.
Repository:
rL LLVM
https://reviews.llvm.org/D48149
More information about the llvm-commits
mailing list