[PATCH] D39009: [PowerPC] Simplify a Swap if it feeds a Splat
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 12:14:02 PDT 2017
echristo added inline comments.
================
Comment at: lib/Target/PowerPC/PPCMIPeephole.cpp:393
+ unsigned SplatImm = MI.getOperand(1).getImm();
+ if (SwapOp1 == SwapOp2 && SwapImm == 2) {
+ unsigned NewElem = 0;
----------------
Early break rather than more indenting please?
================
Comment at: lib/Target/PowerPC/PPCMIPeephole.cpp:403
+ else
+ llvm_unreachable("Unknown splat opcode.");
+
----------------
This seems problematic if a new splat opcode is ever added. Should we just break and possibly DEBUG?
https://reviews.llvm.org/D39009
More information about the llvm-commits
mailing list