diff options
author | dpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-17 20:30:42 +0000 |
---|---|---|
committer | dpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-17 20:30:42 +0000 |
commit | 8178326d1c9a04a4df7fa93fe939a557ce742d79 (patch) | |
tree | 6d7b0c59ce1ab4e41f91ce50479623e2ccf8f8ae /gcc/config/rs6000/predicates.md | |
parent | 6074722d680597a995daaccbf126565a4d95f681 (diff) | |
download | gcc-8178326d1c9a04a4df7fa93fe939a557ce742d79.tar.gz |
* config/rs6000/predicates.md (s5bit_cint_operand,
u5bit_cint_operand): New.
* config/rs6000/altivec.md (altivec_vspltb, altivec_vsplth,
altivec_vspltisw_v4sf): Use new 5 bit constant operand predicates.
* config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Fix signed
5 bit constant check.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101133 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/predicates.md')
-rw-r--r-- | gcc/config/rs6000/predicates.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 664c7f0b05d..a89b10c5b65 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -44,6 +44,16 @@ (and (match_code "reg") (match_test "XER_REGNO_P (REGNO (op))"))) +;; Return 1 if op is a signed 5-bit constant integer. +(define_predicate "s5bit_cint_operand" + (and (match_code "const_int") + (match_test "INTVAL (op) >= -16 && INTVAL (op) <= 15"))) + +;; Return 1 if op is a unsigned 5-bit constant integer. +(define_predicate "u5bit_cint_operand" + (and (match_code "const_int") + (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 31"))) + ;; Return 1 if op is a signed 8-bit constant integer. ;; Integer multiplcation complete more quickly (define_predicate "s8bit_cint_operand" |