[PATCH] D14853: [PPC]: Peephole optimize small accesss to aligned globals.
hfinkel@anl.gov via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 9 02:03:32 PST 2015
hfinkel added inline comments.
================
Comment at: lib/Target/PowerPC/PPCISelDAGToDAG.cpp:4143
@@ +4142,3 @@
+ // processors with fusion.
+ if (PPCSubTarget->hasFusion())
+ return;
----------------
But we should do this when optimizing for code size, even on the `P8`:
if (PPCSubTarget->hasFusion() && !MF->getFunction()->optForSize())
or, if this really *hurts* performance on the `P8`, use `optForMinSize()`.
Also, we don't need to turn this off on the `P8` when there is only a single (non-debug) user because, as the ELF v2 ABI spec points out:
addis r4, r3, upper
<lbz,lhz,lwz,ld> r4, lower(r4)
is also good.
Repository:
rL LLVM
http://reviews.llvm.org/D14853
More information about the llvm-commits
mailing list