The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
While investigating 6317170, it was noted that the CmpLTMask node could profit from a Ideal() function which transforms (CmpLTMask (SubI x y) 0) into (CmpLTMask x y).
Small improvements in 201_compress are expected.
Comments
The recommended transformation is not correct (try x=Integer.MIN_VALUE, y=1) but there is nonetheless a transformation that applies. Recommended method is "do in .ad files as match() rule. Look on cadd_cmpLTMask, for example."
Current compilation of x<y and x-y<0:
return x < y;
00c xorl R10, R10 # int
00f movl RAX, #1 # int
014 cmpl RSI, RDX
016 cmovlge RAX, R10 # signed, int
return (x - y) < 0;
00c subl RSI, RDX # int
00e movl RAX, #1 # int
013 xorl R11, R11 # int
016 testl RSI, RSI
018 cmovlge RAX, R11 # signed, int
Proposed improvement:
return (x - y) < 0;
00e movl RAX, #1 # int
013 xorl R11, R11 # int
00c cmpl RSI, RDX # int
018 cmovlns RAX, R11 # signed, int