Skip to content
Snippets Groups Projects
Commit 787ac959 authored by Philipp Tomsich's avatar Philipp Tomsich
Browse files

RISC-V: Optimize slli(.uw)? + addw + zext.w into sh[123]add + zext.w

gcc/ChangeLog:

	* config/riscv/bitmanip.md: Handle corner-cases for combine
	when chaining slli(.uw)? + addw
	* config/riscv/riscv-protos.h (riscv_shamt_matches_mask_p):
	Define prototype.
	* config/riscv/riscv.cc (riscv_shamt_matches_mask_p):
	Helper for evaluating the relationship between two operands.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/zba-shNadd-04.c: New test.
parent 30c2d8df
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment