+2017-10-08 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
+ a conditional jump (and the compare for it) so that pc_rtx is the
+ last operand.
+ * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
+ for the deleted and renamed ctr<mode>_internal[234] patterns.
+ * config/rs6000/rs6000.md: Delete second conditional branch pattern.
+ Delete second conditional return pattern.
+ (ctr<mode>_internal2): Delete this second bdnz pattern.
+ (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
+ (ctr<mode>_internal4): Delete this second bdz pattern.
+
2017-10-08 Eric Botcazou <ebotcazou@adacore.com>
* tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
emit_move_insn (cond, gen_rtx_COMPARE (CCmode, src_check,
GEN_INT (4096 - bytes)));
- rtx cmp_rtx = gen_rtx_LT (VOIDmode, cond, const0_rtx);
+ rtx cmp_rtx = gen_rtx_GE (VOIDmode, cond, const0_rtx);
rtx ifelse = gen_rtx_IF_THEN_ELSE (VOIDmode, cmp_rtx,
- pc_rtx, lab_ref);
+ lab_ref, pc_rtx);
rtx j = emit_jump_insn (gen_rtx_SET (pc_rtx, ifelse));
JUMP_LABEL (j) = strncmp_label;
LABEL_NUSES (strncmp_label) += 1;
[(set_attr "type" "jmpreg")
(set_attr "length" "4")])
-(define_insn ""
- [(set (pc)
- (if_then_else (match_operator 1 "branch_comparison_operator"
- [(match_operand 2
- "cc_reg_operand" "y")
- (const_int 0)])
- (pc)
- (label_ref (match_operand 0 "" ""))))]
- ""
- "*
-{
- return output_cbranch (operands[1], \"%l0\", 1, insn);
-}"
- [(set_attr "type" "branch")])
-
-(define_insn ""
- [(set (pc)
- (if_then_else (match_operator 0 "branch_comparison_operator"
- [(match_operand 1
- "cc_reg_operand" "y")
- (const_int 0)])
- (pc)
- (any_return)))]
- "<return_pred>"
- "*
-{
- return output_cbranch (operands[0], NULL, 1, insn);
-}"
- [(set_attr "type" "jmpreg")
- (set_attr "length" "4")])
-
;; Logic on condition register values.
; This pattern matches things like
[(set_attr "type" "branch")
(set_attr "length" "*,16,20,20")])
-(define_insn "ctr<mode>_internal2"
- [(set (pc)
- (if_then_else (ne (match_operand:P 1 "register_operand" "c,*b,*b,*b")
- (const_int 1))
- (pc)
- (label_ref (match_operand 0 "" ""))))
- (set (match_operand:P 2 "nonimmediate_operand" "=1,*r,m,*d*wi*c*l")
- (plus:P (match_dup 1)
- (const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:P 4 "=X,X,&r,r"))]
- ""
- "*
-{
- if (which_alternative != 0)
- return \"#\";
- else if (get_attr_length (insn) == 4)
- return \"bdz %l0\";
- else
- return \"bdnz $+8\;b %l0\";
-}"
- [(set_attr "type" "branch")
- (set_attr "length" "*,16,20,20")])
-
;; Similar but use EQ
-(define_insn "ctr<mode>_internal3"
+(define_insn "ctr<mode>_internal2"
[(set (pc)
(if_then_else (eq (match_operand:P 1 "register_operand" "c,*b,*b,*b")
(const_int 1))
[(set_attr "type" "branch")
(set_attr "length" "*,16,20,20")])
-(define_insn "ctr<mode>_internal4"
- [(set (pc)
- (if_then_else (eq (match_operand:P 1 "register_operand" "c,*b,*b,*b")
- (const_int 1))
- (pc)
- (label_ref (match_operand 0 "" ""))))
- (set (match_operand:P 2 "nonimmediate_operand" "=1,*r,m,*d*wi*c*l")
- (plus:P (match_dup 1)
- (const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:P 4 "=X,X,&r,r"))]
- ""
- "*
-{
- if (which_alternative != 0)
- return \"#\";
- else if (get_attr_length (insn) == 4)
- return \"bdnz %l0\";
- else
- return \"bdz $+8\;b %l0\";
-}"
- [(set_attr "type" "branch")
- (set_attr "length" "*,16,20,20")])
-
;; Now the splitters if we could not allocate the CTR register
(define_split