Skip to content

Commit ffe4f55

Browse files
[RSIC-V] Fix 32bit riscv with zbs extension enabled
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.
1 parent 4ad5274 commit ffe4f55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/config/riscv/predicates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
/* Check whether the constant can be loaded in a single
7878
instruction with zbs extensions. */
79-
if (TARGET_64BIT && TARGET_ZBS && SINGLE_BIT_MASK_OPERAND (INTVAL (op)))
79+
if (TARGET_ZBS && SINGLE_BIT_MASK_OPERAND (INTVAL (op)))
8080
return false;
8181

8282
/* Otherwise check whether the constant can be loaded in a single

0 commit comments

Comments
 (0)