[PATCH] D15138: Fix signbit related bitcast optimization for ppc_fp128

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 08:10:11 PST 2015


hfinkel added a comment.

Thanks for continuing to work on this!

The EXTRACT_ELEMENT index is Endian sensitive in this case, right? I suspect you need to use index 1 for big-Endian targets.


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:7331
@@ -7322,1 +7330,3 @@
     SDLoc DL(N);
+    if (N0.getValueType() == MVT::ppcf128) {
+      assert(VT.getSizeInBits() == 128);
----------------
I think you need a check for !LegalTypes here because EXTRACT_ELEMENT should only be used prior to legalization, and i64 might not be legal (if you're compiling for ppc32).

================
Comment at: test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll:1
@@ +1,2 @@
+; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s
+
----------------
Please also run these tests for the pwr7 and some ppc32 target.


http://reviews.llvm.org/D15138





More information about the llvm-commits mailing list