[PATCH] D26521: [X86] Allow folding of reloads from stack slots when loading a subreg of the spilled reg

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 09:47:19 PST 2016


wmi added inline comments.


================
Comment at: lib/CodeGen/TargetInstrInfo.cpp:547
+        unsigned SubRegSize = TRI->getSubRegIdxSize(SubReg);
+        if (SubRegSize > 0 && !(SubRegSize % 8))
+          OpSize = SubRegSize / 8;
----------------
In which case we will have (SubRegSize % 8) != 0?


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:6281
+                                    MachineInstr *LoadMI) const {
+  // We only support folding into loads from stack-slots.
+  if (LoadMI || MO.isDef())
----------------
Why only folding from stack-slot is supported but folding from load is not?


https://reviews.llvm.org/D26521





More information about the llvm-commits mailing list