This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[3.4 PATCH] Fix a regression introduced by PR14981 backport
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 May 2005 16:06:11 -0400
- Subject: [3.4 PATCH] Fix a regression introduced by PR14981 backport
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
There seem to be multiple bugs in the PR14981 backport.
One is that in 3.4.x the insns use VOIDmode on the GT etc. operator, so
with :SF resp. :DF on MATCH_OPERATOR the splitter never matches
and this results in
FAIL: gcc.dg/20020523-1.c (test for excess errors)
WARNING: gcc.dg/20020523-1.c compilation failed to produce executable
FAIL: gcc.dg/20020523-2.c (test for excess errors)
WARNING: gcc.dg/20020523-2.c compilation failed to produce executable
regression on gcc-3_4-branch.
Another bug is a typo in the sse_movsfcc*const* splitter, it creates
(and:V4SF (reg:SF ...) (reg:V4SF ...)) which obviously doesn't match
anything.
And also, the gen* programs report missing mode on source (i.e.
IF_THEN_ELSE)
in all the 4 patterns.
Fixed thusly. Bootstrapped/regtested on i386-linux, no regressions
and the above 2 regressions are fixed.
Ok for 3.4 branch?
2005-05-10 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (sse_mov?fcc* splitters): Add mode to
IF_THEN_ELSE, remove mode from MATCH_OPERATOR. Fix a typo.
--- gcc/config/i386/i386.md.jj 2005-05-06 12:46:28.000000000 +0200
+++ gcc/config/i386/i386.md 2005-05-10 00:47:12.000000000 +0200
@@ -17085,11 +17085,11 @@
;; or op2, op0 - get the nonzero one into the result.
(define_split
[(set (match_operand:SF 0 "register_operand" "")
- (if_then_else (match_operator:SF 1 "sse_comparison_operator"
- [(match_operand:SF 4 "register_operand" "")
- (match_operand:SF 5 "nonimmediate_operand" "")])
- (match_operand:SF 2 "register_operand" "")
- (match_operand:SF 3 "register_operand" "")))
+ (if_then_else:SF (match_operator 1 "sse_comparison_operator"
+ [(match_operand:SF 4 "register_operand" "")
+ (match_operand:SF 5 "nonimmediate_operand" "")])
+ (match_operand:SF 2 "register_operand" "")
+ (match_operand:SF 3 "register_operand" "")))
(clobber (match_operand 6 "" ""))
(clobber (reg:CC 17))]
"SSE_REG_P (operands[0]) && reload_completed"
@@ -17123,11 +17123,11 @@
(define_split
[(set (match_operand:DF 0 "register_operand" "")
- (if_then_else (match_operator:DF 1 "sse_comparison_operator"
- [(match_operand:DF 4 "register_operand" "")
- (match_operand:DF 5 "nonimmediate_operand" "")])
- (match_operand:DF 2 "register_operand" "")
- (match_operand:DF 3 "register_operand" "")))
+ (if_then_else:DF (match_operator 1 "sse_comparison_operator"
+ [(match_operand:DF 4 "register_operand" "")
+ (match_operand:DF 5 "nonimmediate_operand" "")])
+ (match_operand:DF 2 "register_operand" "")
+ (match_operand:DF 3 "register_operand" "")))
(clobber (match_operand 6 "" ""))
(clobber (reg:CC 17))]
"SSE_REG_P (operands[0]) && reload_completed"
@@ -17253,11 +17253,11 @@
(define_split
[(set (match_operand:SF 0 "register_operand" "")
- (if_then_else (match_operator:SF 1 "comparison_operator"
- [(match_operand:SF 4 "nonimmediate_operand" "")
- (match_operand:SF 5 "nonimmediate_operand" "")])
- (match_operand:SF 2 "nonmemory_operand" "")
- (match_operand:SF 3 "nonmemory_operand" "")))]
+ (if_then_else:SF (match_operator 1 "comparison_operator"
+ [(match_operand:SF 4 "nonimmediate_operand" "")
+ (match_operand:SF 5 "nonimmediate_operand" "")])
+ (match_operand:SF 2 "nonmemory_operand" "")
+ (match_operand:SF 3 "nonmemory_operand" "")))]
"SSE_REG_P (operands[0]) && reload_completed
&& (const0_operand (operands[2], GET_MODE (operands[0]))
|| const0_operand (operands[3], GET_MODE (operands[0])))"
@@ -17284,18 +17284,18 @@
else
{
operands[7] = operands[2];
- operands[6] = operands[0];
+ operands[6] = operands[8];
}
operands[7] = simplify_gen_subreg (V4SFmode, operands[7], SFmode, 0);
})
(define_split
[(set (match_operand:DF 0 "register_operand" "")
- (if_then_else (match_operator:DF 1 "comparison_operator"
- [(match_operand:DF 4 "nonimmediate_operand" "")
- (match_operand:DF 5 "nonimmediate_operand" "")])
- (match_operand:DF 2 "nonmemory_operand" "")
- (match_operand:DF 3 "nonmemory_operand" "")))]
+ (if_then_else:DF (match_operator 1 "comparison_operator"
+ [(match_operand:DF 4 "nonimmediate_operand" "")
+ (match_operand:DF 5 "nonimmediate_operand" "")])
+ (match_operand:DF 2 "nonmemory_operand" "")
+ (match_operand:DF 3 "nonmemory_operand" "")))]
"SSE_REG_P (operands[0]) && reload_completed
&& (const0_operand (operands[2], GET_MODE (operands[0]))
|| const0_operand (operands[3], GET_MODE (operands[0])))"
Jakub