[PATCH] D21739: [TTI] Add functions determining if int parameters/returns should be zeroext/signext.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 02:56:52 PDT 2016


dsanders added inline comments.

================
Comment at: lib/Target/Mips/MipsTargetTransformInfo.h:42
@@ +41,3 @@
+
+  bool shouldExtI32Param() const { return ST->isABI_N64(); }
+};
----------------
This doesn't look correct to me. On our target we unconditionally add the signext attribute to i32 in the frontend. This only has a significant effect for the 64-bit ABI's (N32 and N64) but it's still useful for the 32-bit ABI's (O32) as a reminder of how 32-bit code operates when run on a 64-bit processor (every instruction from the 32-bit subset sign-extends the result value from 32-bit to register width).

Returns also behave the same way as parameters.


Repository:
  rL LLVM

http://reviews.llvm.org/D21739





More information about the llvm-commits mailing list