[PATCH] D21409: Emit a swap for STXVD2X when it's emitted by matching a 'store' node

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 10:52:49 PDT 2016


timshen added inline comments.

================
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:940
@@ -939,1 +939,3 @@
           (STXVD2X $rS, xoaddr:$dst)>;
+let Predicates = [IsLittleEndian] in {
+def : Pat<(store v2i64:$rS, xoaddr:$dst),
----------------
nemanjai wrote:
> timshen wrote:
> > Without this change, powerpc le stxvd2x still works in most of the cases. Does that mean this line introduces a second code path to handle powerpc le stxvd2x? If so, can we remove the first one?
> I am not sure which definitions you're referring to as first and second and what you're suggesting we remove. As you can see above, I've removed the DAG pattern that was part of the instruction definition.
The DAG pattern "(store v2f64:$XT, xoaddr:$dst)" is for big endian, not little endian, because it doesn't consider swap at all.

By saying the first code path I mean PPCTargetLowering::expandVSXStoreForLE().


Repository:
  rL LLVM

http://reviews.llvm.org/D21409





More information about the llvm-commits mailing list