[PATCH] [X86] Use single add/sub for large stack offsets

Anton Korobeynikov anton at korobeynikov.info
Wed Jan 28 09:07:54 PST 2015


================
Comment at: lib/Target/X86/X86FrameLowering.cpp:202
@@ +201,3 @@
+      unsigned Reg = isSub
+        ? (unsigned)(Is64BitTarget ? X86::RAX : X86::EAX)
+        : findDeadCallerSavedReg(MBB, MBBI, TRI, Is64BitTarget);
----------------
This clobbers rax/eax w/o checking whether it's a livein or not. This may be a problem for functions with inreg attributes. I believe the code should always use findDeadCallerSavedReg().

http://reviews.llvm.org/D7226

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list