diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-02-24 20:23:51 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-02-24 20:23:51 +0100 |
commit | 953e25c44acc2458d854b1442d7775d997aaf187 (patch) | |
tree | 2c8a21a84fef81eadb262cc7c2dab57ccd1d2046 /gcc/simplify-rtx.c | |
parent | c7f01cb61dd80f3c8282ae81a4d60c654908eb69 (diff) |
re PR rtl-optimization/89445 (_mm512_maskz_loadu_pd "forgets" to use the mask)
PR rtl-optimization/89445
* simplify-rtx.c (simplify_ternary_operation): Don't use
simplify_merge_mask on operands that may trap.
* rtlanal.c (may_trap_p_1): Use FLOAT_MODE_P instead of
SCALAR_FLOAT_MODE_P checks. For integral division by zero, if
second operand is CONST_VECTOR, check if any element could be zero.
Don't expect traps for VEC_{MERGE,SELECT,CONCAT,DUPLICATE} unless
their operands can trap.
* gcc.target/i386/avx512f-pr89445.c: New test.
From-SVN: r269176
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 83580a259f3..89a46a933fa 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -6073,8 +6073,10 @@ simplify_ternary_operation (enum rtx_code code, machine_mode mode, if (!side_effects_p (op2)) { - rtx top0 = simplify_merge_mask (op0, op2, 0); - rtx top1 = simplify_merge_mask (op1, op2, 1); + rtx top0 + = may_trap_p (op0) ? NULL_RTX : simplify_merge_mask (op0, op2, 0); + rtx top1 + = may_trap_p (op1) ? NULL_RTX : simplify_merge_mask (op1, op2, 1); if (top0 || top1) return simplify_gen_ternary (code, mode, mode, top0 ? top0 : op0, |