Skip to content
Snippets Groups Projects
Commit 9020da78 authored by Drew Ross's avatar Drew Ross Committed by Jakub Jelinek
Browse files

match.pd: Canonicalize (signed x << c) >> c [PR101955]

Canonicalizes (signed x << c) >> c into the lowest
precision(type) - c bits of x IF those bits have a mode precision or a
precision of 1. Also combines this rule with (unsigned x << c) >> c -> x &
((unsigned)-1 >> c) to prevent duplicate pattern.

	PR middle-end/101955
	* match.pd ((signed x << c) >> c): New canonicalization.

	* gcc.dg/pr101955.c: New test.
parent 236ec7aa
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