]> gcc.gnu.org Git - gcc.git/commitdiff
[RSIC-V] Fix 32bit riscv with zbs extension enabled
authorAndrew Pinski <apinski@marvell.com>
Fri, 5 Aug 2022 02:34:55 +0000 (19:34 -0700)
committerAndrew Pinski <apinski@marvell.com>
Fri, 5 Aug 2022 02:42:42 +0000 (19:42 -0700)
The problem here was a disconnect between splittable_const_int_operand
predicate and the function riscv_build_integer_1 for 32bits with zbs enabled.
The splittable_const_int_operand predicate had a check for TARGET_64BIT which
was not needed so this patch removed it.

Committed as obvious after a build for risc32-elf configured with --with-arch=rv32imac_zba_zbb_zbc_zbs.

Thanks,
Andrew Pinski

gcc/ChangeLog:

* config/riscv/predicates.md (splittable_const_int_operand):
Remove the check for TARGET_64BIT for single bit const values.

gcc/config/riscv/predicates.md

index 90db5dfcdd5f114e59863700900cc39d56aca0c4..e98db2cb5743b168b6756565cce00760845a0113 100644 (file)
@@ -76,7 +76,7 @@
 
   /* Check whether the constant can be loaded in a single
      instruction with zbs extensions.  */
-  if (TARGET_64BIT && TARGET_ZBS && SINGLE_BIT_MASK_OPERAND (INTVAL (op)))
+  if (TARGET_ZBS && SINGLE_BIT_MASK_OPERAND (INTVAL (op)))
     return false;
 
   /* Otherwise check whether the constant can be loaded in a single
This page took 0.066023 seconds and 5 git commands to generate.