summaryrefslogtreecommitdiff
path: root/gcc/config/arm/predicates.md
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2013-05-31 09:29:41 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2013-05-31 09:29:41 +0000
commitb6af05a9b34eab3b8aafa34b54adbec2c70a304f (patch)
tree4bb66cfa14474b935cb3c2212d06af921d6c1f24 /gcc/config/arm/predicates.md
parentf800c166104121e785d57933fe1412101b0496d0 (diff)
downloadgcc-b6af05a9b34eab3b8aafa34b54adbec2c70a304f.tar.gz
re PR target/56315 (ARM: Improve use of 64-bit constants in logical operations)
gcc/ 2013-05-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR target/56315 * config/arm/arm.c (const_ok_for_dimode_op): Handle IOR. * config/arm/arm.md (*iordi3_insn): Change to insn_and_split. * config/arm/neon.md (iordi3_neon): Remove. (neon_vorr<mode>): Generate iordi3 instead of iordi3_neon. * config/arm/predicates.md (imm_for_neon_logic_operand): Move to earlier in the file. (neon_logic_op2): Likewise. (arm_iordi_operand_neon): New predicate. gcc/testsuite/ 2013-05-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR target/56315 * gcc.target/arm/iordi3-opt.c: New test. From-SVN: r199527
Diffstat (limited to 'gcc/config/arm/predicates.md')
-rw-r--r--gcc/config/arm/predicates.md28
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
index 92de9fe8bd9..3cec5690193 100644
--- a/gcc/config/arm/predicates.md
+++ b/gcc/config/arm/predicates.md
@@ -42,6 +42,17 @@
(ior (match_operand 0 "imm_for_neon_inv_logic_operand")
(match_operand 0 "s_register_operand")))
+(define_predicate "imm_for_neon_logic_operand"
+ (match_code "const_vector")
+{
+ return (TARGET_NEON
+ && neon_immediate_valid_for_logic (op, mode, 0, NULL, NULL));
+})
+
+(define_predicate "neon_logic_op2"
+ (ior (match_operand 0 "imm_for_neon_logic_operand")
+ (match_operand 0 "s_register_operand")))
+
;; Any hard register.
(define_predicate "arm_hard_register_operand"
(match_code "reg")
@@ -162,6 +173,12 @@
(match_test "const_ok_for_dimode_op (INTVAL (op), AND)"))
(match_operand 0 "neon_inv_logic_op2")))
+(define_predicate "arm_iordi_operand_neon"
+ (ior (match_operand 0 "s_register_operand")
+ (and (match_code "const_int")
+ (match_test "const_ok_for_dimode_op (INTVAL (op), IOR)"))
+ (match_operand 0 "neon_logic_op2")))
+
(define_predicate "arm_adddi_operand"
(ior (match_operand 0 "s_register_operand")
(and (match_code "const_int")
@@ -535,17 +552,6 @@
(ior (match_operand 0 "s_register_operand")
(match_operand 0 "imm_for_neon_rshift_operand")))
-(define_predicate "imm_for_neon_logic_operand"
- (match_code "const_vector")
-{
- return (TARGET_NEON
- && neon_immediate_valid_for_logic (op, mode, 0, NULL, NULL));
-})
-
-(define_predicate "neon_logic_op2"
- (ior (match_operand 0 "imm_for_neon_logic_operand")
- (match_operand 0 "s_register_operand")))
-
;; Predicates for named expanders that overlap multiple ISAs.
(define_predicate "cmpdi_operand"