[Bug target/110170] Sub-optimal conditional jumps in conditional-swap with floating point
crazylht at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 12 02:17:19 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110170
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
ix86_expand_sse_fp_minmax failed since rtx_equal_p (cmp_op0, if_true) is false,
249(reg:DF 86 [ _1 ]) (if_true)
250(reg:DF 83 [ _2 ]) (if_false)
251(reg:DF 82 [ _1 ]) (cmp0_op0)
252(reg:DF 83 [ _2 ]) (cmp1_op1)
but here if_true is just a copy from cmp_op0 but with different REGNO,
rtx_equal_p seems too conservative here.
85(code_label 26 13 17 3 4 (nil) [1 uses])
86(note 17 26 5 3 [bb 3] NOTE_INSN_BASIC_BLOCK)
87(insn 5 17 6 3 (set (reg:DF 86 [ _1 ])
88 (reg:DF 82 [ _1 ])) "test.C":3:20 153 {*movdf_internal}
89 (expr_list:REG_DEAD (reg:DF 82 [ _1 ])
90 (nil)))
91(insn 6 5 7 3 (set (reg:DF 82 [ _1 ])
92 (reg:DF 83 [ _2 ])) "test.C":4:14 discrim 1 153 {*movdf_internal}
93 (expr_list:REG_DEAD (reg:DF 83 [ _2 ])
94 (nil)))
95(insn 7 6 18 3 (set (reg:DF 83 [ _2 ])
96 (reg:DF 86 [ _1 ])) "test.C":3:20 discrim 1 153 {*movdf_internal}
97 (expr_list:REG_DEAD (reg:DF 86 [ _1 ])
98 (nil)))
3812 if (rtx_equal_p (cmp_op0, if_true) && rtx_equal_p (cmp_op1, if_false))
3813 is_min = true;
3814 else if (rtx_equal_p (cmp_op1, if_true) && rtx_equal_p (cmp_op0,
if_false))
3815 is_min = false;
3816 else
3817=> return false;
More information about the Gcc-bugs
mailing list