Skip to content

Commit

Permalink
[RSIC-V] Fix 32bit riscv with zbs extension enabled
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
apinski-cavium committed Aug 5, 2022
1 parent 4ad5274 commit ffe4f55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/config/riscv/predicates.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ffe4f55

Please sign in to comment.