Skip to content

Commit 2772552

Browse files
randall77awly
authored andcommitted
[release-branch.go1.21] Revert "cmd/compile: omit redundant sign/unsign extension on arm64"
This reverts CL 427454. Reason for revert: causes incorrect generated code in some rare cases We'll fix-forward at tip, so the revert just needs to be done for 1.21. Fixes golang#62143 Change-Id: Id242230481ff4d4ba5f58236c6d8237729fc3b80 Reviewed-on: https://go-review.googlesource.com/c/go/+/520976 Run-TryBot: Keith Randall <[email protected]> Reviewed-by: Ruinan Sun <[email protected]> Reviewed-by: Keith Randall <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 8eafb55 commit 2772552

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

src/cmd/compile/internal/ssa/_gen/ARM64Ops.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import "strings"
1313
// - *const instructions may use a constant larger than the instruction can encode.
1414
// In this case the assembler expands to multiple instructions and uses tmp
1515
// register (R27).
16-
// - All 32-bit Ops will zero the upper 32 bits of the destination register.
1716

1817
// Suffixes encode the bit width of various instructions.
1918
// D (double word) = 64 bit

src/cmd/compile/internal/ssa/rewrite.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,10 +1290,6 @@ func zeroUpper32Bits(x *Value, depth int) bool {
12901290
OpAMD64SHRL, OpAMD64SHRLconst, OpAMD64SARL, OpAMD64SARLconst,
12911291
OpAMD64SHLL, OpAMD64SHLLconst:
12921292
return true
1293-
case OpARM64REV16W, OpARM64REVW, OpARM64RBITW, OpARM64CLZW, OpARM64EXTRWconst,
1294-
OpARM64MULW, OpARM64MNEGW, OpARM64UDIVW, OpARM64DIVW, OpARM64UMODW,
1295-
OpARM64MADDW, OpARM64MSUBW, OpARM64RORW, OpARM64RORWconst:
1296-
return true
12971293
case OpArg:
12981294
return x.Type.Size() == 4
12991295
case OpPhi, OpSelect0, OpSelect1:

0 commit comments

Comments
 (0)