aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-11-15 09:30:08 +0100
committerJakub Jelinek <jakub@redhat.com>2021-11-15 09:30:08 +0100
commit625eef42e32e65b3da0e65e23a706d228896d01c (patch)
tree834d66c2b2865cca0c10c861ef14ea04149f2a4f /gcc/config/i386
parent9fa72756d90e0d9edadf6e6f5f56476029925788 (diff)
downloadgcc-625eef42e32e65b3da0e65e23a706d228896d01c.zip
gcc-625eef42e32e65b3da0e65e23a706d228896d01c.tar.gz
gcc-625eef42e32e65b3da0e65e23a706d228896d01c.tar.bz2
i386: Fix up x86 atomic_bit_test* expanders for !TARGET_HIMODE_MATH [PR103205]
With !TARGET_HIMODE_MATH, the OPTAB_DIRECT expand_simple_binop fail and so we ICE. We don't really care if they are done promoted in SImode instead. 2021-11-15 Jakub Jelinek <jakub@redhat.com> PR target/103205 * config/i386/sync.md (atomic_bit_test_and_set<mode>, atomic_bit_test_and_complement<mode>, atomic_bit_test_and_reset<mode>): Use OPTAB_WIDEN instead of OPTAB_DIRECT. * gcc.target/i386/pr103205.c: New test.
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/sync.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md
index 05a8352..9716a0b 100644
--- a/gcc/config/i386/sync.md
+++ b/gcc/config/i386/sync.md
@@ -726,7 +726,7 @@
rtx result = convert_modes (<MODE>mode, QImode, tem, 1);
if (operands[4] == const0_rtx)
result = expand_simple_binop (<MODE>mode, ASHIFT, result,
- operands[2], operands[0], 0, OPTAB_DIRECT);
+ operands[2], operands[0], 0, OPTAB_WIDEN);
if (result != operands[0])
emit_move_insn (operands[0], result);
DONE;
@@ -763,7 +763,7 @@
rtx result = convert_modes (<MODE>mode, QImode, tem, 1);
if (operands[4] == const0_rtx)
result = expand_simple_binop (<MODE>mode, ASHIFT, result,
- operands[2], operands[0], 0, OPTAB_DIRECT);
+ operands[2], operands[0], 0, OPTAB_WIDEN);
if (result != operands[0])
emit_move_insn (operands[0], result);
DONE;
@@ -801,7 +801,7 @@
rtx result = convert_modes (<MODE>mode, QImode, tem, 1);
if (operands[4] == const0_rtx)
result = expand_simple_binop (<MODE>mode, ASHIFT, result,
- operands[2], operands[0], 0, OPTAB_DIRECT);
+ operands[2], operands[0], 0, OPTAB_WIDEN);
if (result != operands[0])
emit_move_insn (operands[0], result);
DONE;