File tree Expand file tree Collapse file tree 2 files changed +105
-111
lines changed
src/cmd/compile/internal/ssa/_gen Expand file tree Collapse file tree 2 files changed +105
-111
lines changed Original file line number Diff line number Diff line change 857857(CZERONEZ x x) => (MOVDconst [0])
858858(CZERO(EQ|NE)Z (MOVDconst [0]) _) => (MOVDconst [0])
859859
860- // Fold OR(CZERONEZ(OP x y), CZEROEQZ x) into OP x (CZERONEZ y)
860+ // Optimize conditional arithmetic operations
861861(OR (CZERONEZ <t> ((ADD|SUB|OR|XOR|SUBW) x y) cond) (CZEROEQZ <t> x cond)) => ((ADD|SUB|OR|XOR|SUBW) x (CZERONEZ <t> y cond))
862862(OR (CZEROEQZ <t> ((ADD|SUB|OR|XOR|SUBW) x y) cond) (CZERONEZ <t> x cond)) => ((ADD|SUB|OR|XOR|SUBW) x (CZEROEQZ <t> y cond))
863-
864- // Fold OR(CZERONEZ(AND), CZEROEQZ) when operands match
865863(OR (CZERONEZ x:(AND z _) cond) y:(CZEROEQZ z cond)) => (OR x y)
866864(OR (CZEROEQZ x:(AND z _) cond) y:(CZERONEZ z cond)) => (OR x y)
867-
868- // Fold OR(CZERONEZ(ANDI), CZEROEQZ) when operands match
869865(OR (CZERONEZ x:(ANDI <t> [c] z) cond) y:(CZEROEQZ z cond)) => (OR x y)
870866(OR (CZEROEQZ x:(ANDI <t> [c] z) cond) y:(CZERONEZ z cond)) => (OR x y)
871-
872- // Fold OR(CZERONEZ(OPI [c] x), CZEROEQZ x) into OP x (CZERONEZ c)
873867(OR (CZERONEZ <t> ((ADDI|ORI|XORI) [c] x) cond) (CZEROEQZ <t> x cond)) => ((ADD|OR|XOR) x (CZERONEZ <t> (MOVDconst [c]) cond))
874868(OR (CZEROEQZ <t> ((ADDI|ORI|XORI) [c] x) cond) (CZERONEZ <t> x cond)) => ((ADD|OR|XOR) x (CZEROEQZ <t> (MOVDconst [c]) cond))
You can’t perform that action at this time.
0 commit comments