[llvm] 9d3e78e - [NFC] Update loop.decrement.reg intrinsic comment

Sam Parker via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 01:20:27 PST 2020


Author: Sam Parker
Date: 2020-01-13T09:18:57Z
New Revision: 9d3e78e704fa6201bceb48f45fb061f572c5aa2e

URL: https://github.com/llvm/llvm-project/commit/9d3e78e704fa6201bceb48f45fb061f572c5aa2e
DIFF: https://github.com/llvm/llvm-project/commit/9d3e78e704fa6201bceb48f45fb061f572c5aa2e.diff

LOG: [NFC] Update loop.decrement.reg intrinsic comment

Note that the intrinsic is now understood by SCEV and that other
optimisations can treat it as a sub.

Added: 
    

Modified: 
    llvm/include/llvm/IR/Intrinsics.td

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td
index 9d5544b8883c..865e4ccc9bc4 100644
--- a/llvm/include/llvm/IR/Intrinsics.td
+++ b/llvm/include/llvm/IR/Intrinsics.td
@@ -1314,7 +1314,9 @@ def int_loop_decrement :
 // maximum number of elements processed in an iteration). Return the remaining
 // number of iterations still to be executed. This is effectively a sub which
 // can be used with a phi, icmp and br to control the number of iterations
-// executed, as usual.
+// executed, as usual. Any optimisations are allowed to treat it is a sub, and
+// it's scevable, so it's the backends responsibility to handle cases where it
+// may be optimised.
 def int_loop_decrement_reg :
   Intrinsic<[llvm_anyint_ty],
             [llvm_anyint_ty, llvm_anyint_ty], [IntrNoDuplicate]>;


        


More information about the llvm-commits mailing list