[PATCH, testsuite, i386] BMI2 support for GCC
Richard Henderson
rth@redhat.com
Sat Aug 20 23:50:00 GMT 2011
On 08/20/2011 02:16 PM, Uros Bizjak wrote:
> +(define_insn "bmi2_umul<mode><dwi>3_1"
> + [(set (match_operand:<DWI> 0 "register_operand" "=r")
> + (mult:<DWI>
> + (zero_extend:<DWI>
> + (match_operand:DWIH 1 "nonimmediate_operand" "%d"))
> + (zero_extend:<DWI>
> + (match_operand:DWIH 2 "nonimmediate_operand" "rm"))))]
> + "TARGET_BMI
> + && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
> + "mulx\t{%2, %M0, %N0|%N0, %M0, %2}"
> + [(set_attr "type" "imul")
> + (set_attr "prefix" "vex")
> + (set_attr "mode" "<MODE>")])
You can do better than this, and avoid the %M %N specifiers.
The outputs are truly independent and do not need to be a pair.
See the mn10300 umulsidi3{,_internal} patterns.
r~
More information about the Gcc-patches
mailing list