[PATCH] D19922: [AArch64] Fix DAG selection for cmps for fp16 type

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 10:40:10 PDT 2016


t.p.northover added a subscriber: t.p.northover.
t.p.northover added a comment.

I think the real bug here is in emitComparison, which has exactly this code to promote the arguments but still produces an f16 result. Changing that to f32 ought to fix things (though the dataflow between FCMP and FCCMP is a bit dubious, it's playing rather loose with types given that NZCV is the only register actually modified).


================
Comment at: test/CodeGen/AArch64/half.ll:87-88
@@ +86,4 @@
+;CHECK-LABEL: test_fccmp:
+;CHECK: fcmp
+;CHECK: fccmp
+  %cmp0 = fcmp ogt half 0xH3333, undef
----------------
There are more ways this could go wrong than simply not emitting an fcmp/fccmp. I think you should check for an fcvt producing an s register that then gets used in the comparisons.


Repository:
  rL LLVM

http://reviews.llvm.org/D19922





More information about the llvm-commits mailing list