• Ian Lance Taylor's avatar
    cmd/compile: base PPC64 trunc rules on final type, not op type · d585f04f
    Ian Lance Taylor authored
    Whether a truncation should become a MOVWreg or a MOVWZreg doesn't
    depend on the type of the operand, it depends on the type of the final
    result.  If the final result is unsigned, we can use MOVWZreg.  If the
    final result is signed, we can use MOVWreg.  Checking the type of the
    operand does the wrong thing if truncating an unsigned value to a
    signed value, or vice-versa.
    
    Fixes #29943
    
    Change-Id: Ia6fc7d006486fa02cffd0bec4d910bdd5b6365f8
    Reviewed-on: https://go-review.googlesource.com/c/159760
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    d585f04f
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...