This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR 18503, "sse2_movhpd" issues


Davide Rossetti wrote:

(define_insn "sse2_movhpd"
[(set (match_operand:DF "nonimmediate_operand" "=x,m")
(vec_select:DF
(match_operand:V2DF 1 "nonimmediate_operand" "m,x")
(parallel [(const_int 1)])))]
"TARGET_SSE2 && (GET_CODE (operands[1]) == MEM"
"movhpd\t{%1, %0|%0, %1}"
[(set_attr "type" "ssecvt")
(set_attr "mode" "V2DF")])


problems is that sse2_movhpd produces a V2DF, where the low part is the __same__ and the hi part is loaded from the argument. your code evaluates to a DF !!!
regards


In both, 3.4 and mainline, sse2_movhpd is defined as:

(define_insn "sse2_movhpd"
[(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,m")
(vec_merge:V2DF
(match_operand:V2DF 1 "nonimmediate_operand" "0,0")
(match_operand:V2DF 2 "nonimmediate_operand" "m,x")
(const_int 1)))]
"TARGET_SSE2 && (GET_CODE (operands[1]) == MEM || GET_CODE (operands[2]) == MEM)"
"movhpd\t{%2, %0|%0, %2}"
[(set_attr "type" "ssecvt")
(set_attr "mode" "V2DF")])


(Well, 3.4 has (const_int 2) as a vec_merge constant, which is wrong.)

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]