summaryrefslogtreecommitdiff
path: root/gcc/config/aarch64/aarch64.md
diff options
context:
space:
mode:
authorcarrot <carrot@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-27 16:48:09 +0000
committercarrot <carrot@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-27 16:48:09 +0000
commit25b7d298bc19f447c84718114edc1b080c285aba (patch)
tree50d95b3ec5a31542890562a98fdfe72015237a6d /gcc/config/aarch64/aarch64.md
parent2ccb7428c9788777bb4a9f2f0e03cd3484086694 (diff)
downloadgcc-25b7d298bc19f447c84718114edc1b080c285aba.tar.gz
PR target/62262
* config/aarch64/aarch64.md (*andim_ashift<mode>_bfiz): Check the shift amount before using it. * gcc.target/aarch64/pr62262.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214578 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/aarch64/aarch64.md')
-rw-r--r--gcc/config/aarch64/aarch64.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 3c51fd367e9..1f7ab9151ba 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -3431,7 +3431,8 @@
(and:GPI (ashift:GPI (match_operand:GPI 1 "register_operand" "r")
(match_operand 2 "const_int_operand" "n"))
(match_operand 3 "const_int_operand" "n")))]
- "exact_log2 ((INTVAL (operands[3]) >> INTVAL (operands[2])) + 1) >= 0
+ "(INTVAL (operands[2]) < (<GPI:sizen>))
+ && exact_log2 ((INTVAL (operands[3]) >> INTVAL (operands[2])) + 1) >= 0
&& (INTVAL (operands[3]) & ((1 << INTVAL (operands[2])) - 1)) == 0"
"ubfiz\\t%<w>0, %<w>1, %2, %P3"
[(set_attr "type" "bfm")]