[PATCH] D42574: [ARM] Lower lower saturate to 0 and lower saturate to -1 using bit-operations

Yvan Roux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 01:59:27 PST 2018


yroux added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:4393
+// - k is 0 or -1 (all ones)
+// This function will not check the last condition, thats up tot he caller
+// It returns true if the transformation can be made, and in such case
----------------
typo: that's up to the caller


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:4458
+  // more efficient bit operations, which is possible when k is 0 or -1
+  // On ARM and Thumb-2 which has flexible operand 2 this will result in single
+  // instructions. On Thumb the shift and the bit operation will be two instructions.
----------------
I'd say: "which have flexible..."


https://reviews.llvm.org/D42574





More information about the llvm-commits mailing list