[PATCH] D54749: Saturating float to int casts: Basics [1/n]
Tim Northover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 20 06:01:08 PST 2018
t.p.northover added inline comments.
================
Comment at: docs/LangRef.rst:13105
+
+ declare i32 @llvm.fptoui.sat.f32.i32(float %f)
+ declare i19 @llvm.fptoui.sat.f64.i19(double %f)
----------------
What's going on here? All the other intrinsics I know specify the return type first in the prototype. I didn't even think it was something you could override.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2524
+ while (true) {
+ NewOutTy = (MVT::SimpleValueType)(NewOutTy.getSimpleVT().SimpleTy+1);
+ if (TLI.isOperationLegalOrCustom(Opcode, NewOutTy)) {
----------------
Maybe put the normal assertion in here?
assert(NewOutTy.isInteger() && "Ran out of possibilities!");
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5686
+ getValue(I.getArgOperand(0)),
+ DAG.getValueType(Type)));
+ return nullptr;
----------------
I was expecting this tag to be the scalar type in the vector situation. Does something get neater this way round?
Repository:
rL LLVM
https://reviews.llvm.org/D54749
More information about the llvm-commits
mailing list