diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-12-13 11:12:55 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-12-13 11:12:55 +0100 |
commit | 1a4c0446c0b38d86e7385a114cd99af591eece05 (patch) | |
tree | fe5a9231bd4e0eef6bfe437193ec3494df557a48 /gcc/simplify-rtx.c | |
parent | 814db0c199fb9c050008f9f1e12534425ccc40c8 (diff) | |
download | gcc-1a4c0446c0b38d86e7385a114cd99af591eece05.zip gcc-1a4c0446c0b38d86e7385a114cd99af591eece05.tar.gz gcc-1a4c0446c0b38d86e7385a114cd99af591eece05.tar.bz2 |
re PR target/92908 (wrong code with -Og -fno-tree-fre -mavx512bw and vector compare)
PR target/92908
* simplify-rtx.c (simplify_relational_operation): Punt for vector
cmp_mode and scalar mode, if simplify_relational_operation returned
const_true_rtx.
(simplify_const_relational_operation): Change VOID_mode in function
comment to VOIDmode.
* gcc.target/i386/avx512bw-pr92908.c: New test.
From-SVN: r279369
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index b2ba922..d7046ed 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -5037,6 +5037,15 @@ simplify_relational_operation (enum rtx_code code, machine_mode mode, return NULL_RTX; #endif } + /* For vector comparison with scalar int result, it is unknown + if the target means here a comparison into an integral bitmask, + or comparison where all comparisons true mean const_true_rtx + whole result, or where any comparisons true mean const_true_rtx + whole result. For const0_rtx all the cases are the same. */ + if (VECTOR_MODE_P (cmp_mode) + && SCALAR_INT_MODE_P (mode) + && tem == const_true_rtx) + return NULL_RTX; return tem; } @@ -5383,7 +5392,7 @@ comparison_result (enum rtx_code code, int known_results) } /* Check if the given comparison (done in the given MODE) is actually - a tautology or a contradiction. If the mode is VOID_mode, the + a tautology or a contradiction. If the mode is VOIDmode, the comparison is done in "infinite precision". If no simplification is possible, this function returns zero. Otherwise, it returns either const_true_rtx or const0_rtx. */ |