• Michael Munday's avatar
    cmd/compile: fix merging of s390x conditional moves into branch conditions · 4dbcb53d
    Michael Munday authored
    A type conversion inserted between MOVD{LT,LE,GT,GE,EQ,NE} and CMPWconst
    by CL 36256 broke the rewrite rule designed to merge the two.
    This results in simple for loops (e.g. for i := 0; i < N; i++ {})
    emitting two comparisons instead of one, plus a conditional move.
    
    This CL explicitly types the input to CMPWconst so that the type conversion
    can be omitted. It also adds a test to check that conditional moves aren't
    emitted for loops with 'less than' conditions (i.e. i < N) on s390x.
    
    Fixes #19227.
    
    Change-Id: Ia39e806ed723791c3c755951aef23f957828ea3e
    Reviewed-on: https://go-review.googlesource.com/37334Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    4dbcb53d
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...