Commit 6b2f9bb6 by Segher Boessenkool Committed by Segher Boessenkool

rs6000: Fix for and_operand oversight (PR68332, PR67677)

Calling rs6000_is_valid_and_mask on a reg instead of on a const_int is
not a good idea, as PR68332 and PR67677 as well as testing with
--enable-checking=yes,rtl show.  Fix this.


	PR target/66217
	PR target/67677
	PR target/68332
	* config/rs6000/predicates.md (and_operand): Check that the operand
	is a const_int before calling rs6000_is_valid_and_mask.

From-SVN: r230811
parent f7686428
2015-11-24 Segher Boessenkool <segher@kernel.crashing.org>
PR target/66217
PR target/67677
PR target/68332
* config/rs6000/predicates.md (and_operand): Check that the operand
is a const_int before calling rs6000_is_valid_and_mask.
2015-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2015-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md (*condjump): Rename to... * config/aarch64/aarch64.md (*condjump): Rename to...
...@@ -864,7 +864,8 @@ ...@@ -864,7 +864,8 @@
;; Return 1 if the operand is either a non-special register or a ;; Return 1 if the operand is either a non-special register or a
;; constant that can be used as the operand of a logical AND. ;; constant that can be used as the operand of a logical AND.
(define_predicate "and_operand" (define_predicate "and_operand"
(ior (match_test "rs6000_is_valid_and_mask (op, mode)") (ior (and (match_code "const_int")
(match_test "rs6000_is_valid_and_mask (op, mode)"))
(if_then_else (match_test "fixed_regs[CR0_REGNO]") (if_then_else (match_test "fixed_regs[CR0_REGNO]")
(match_operand 0 "gpc_reg_operand") (match_operand 0 "gpc_reg_operand")
(match_operand 0 "logical_operand")))) (match_operand 0 "logical_operand"))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment