[PATCH] [ARMv8] CodeGen for VSEL
Tim Northover
t.p.northover at gmail.com
Tue Aug 20 05:00:34 PDT 2013
Hi Joey,
A very nice thing to see. I've got some minor questions, but I don't think any would involve a massive rewrite.
================
Comment at: lib/Target/ARM/ARMISelLowering.h:201
@@ -200,1 +200,3 @@
+ // Floating point select
+ VSEL,
----------------
This new VSEL opcode looks virtually identical to CMOV, except for the operand order. Could we use that instead?
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:3209
@@ +3208,3 @@
+ // condition in the sense of firing whenever the previous condition didn't)
+ if (getSubtarget()->hasV8FP() && (TrueVal.getValueType() == MVT::f32 ||
+ TrueVal.getValueType() == MVT::f64)) {
----------------
Combining the two would simplify this logic to something like "if (v8 && floating && slightly nasty condition) { swap things }"
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:3238
@@ +3237,3 @@
+ // Try to generate VSEL on ARMv8.
+ if (getSubtarget()->hasV8FP() && (TrueVal.getValueType() == MVT::f32 ||
+ TrueVal.getValueType() == MVT::f64)) {
----------------
This CondCode selection stuff might be better off in its own function.
http://llvm-reviews.chandlerc.com/D1445
More information about the llvm-commits
mailing list