Skip to content

Commit 46fd6b4

Browse files
jake-ciolekrandall77
authored andcommitted
cmd/compile: remove reduntant Zero rule
These two rules produce the same output but have opposite s%16 conditions. Consolidate them into a single rule. Change-Id: I6daa0e7f7af4a4e59a3125b66b85f59e888586c5 Reviewed-on: https://go-review.googlesource.com/c/go/+/640475 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent bdc2d85 commit 46fd6b4

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

src/cmd/compile/internal/ssa/_gen/AMD64.rules

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,7 @@
404404
(MOVQstoreconst [makeValAndOff(0,0)] destptr mem))
405405

406406
// Adjust zeros to be a multiple of 16 bytes.
407-
(Zero [s] destptr mem) && s%16 != 0 && s > 16 && s%16 > 8 && config.useSSE =>
408-
(Zero [s-s%16] (OffPtr <destptr.Type> destptr [s%16])
409-
(MOVOstoreconst [makeValAndOff(0,0)] destptr mem))
410-
411-
(Zero [s] destptr mem) && s%16 != 0 && s > 16 && s%16 <= 8 && config.useSSE =>
407+
(Zero [s] destptr mem) && s%16 != 0 && s > 16 && config.useSSE =>
412408
(Zero [s-s%16] (OffPtr <destptr.Type> destptr [s%16])
413409
(MOVOstoreconst [makeValAndOff(0,0)] destptr mem))
414410

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

Lines changed: 2 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)