<div dir="ltr">"add" only works for integers. Floating point requires fadd. They are different operations in hardware too so you probably need different instructions.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Tue, Jul 11, 2017 at 8:55 AM, hameeza ahmed <span dir="ltr"><<a href="mailto:hahmed2305@gmail.com" target="_blank">hahmed2305@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank You.<div><br></div><div>How to do the same for add please see the following; it gives duplication error.</div><div><br></div><div><div>def VADD  : I<0x0E, MRMDestReg, (outs VRR128:$dst), (ins VRR128:$src1, VRR128:$src2),"VADD\t{$src1, $src2, $dst|$dst, $src1, $src2}", [(set VRR128:$dst, (add VRR128:$src1, VRR128:$src2))]>, TA;</div><div> </div><div>def : Pat<(add VRR128:$src1, VRR128:$src2), (VADD  VRPIM128:$src1,  VRPIM128:$src2)>; </div></div><div>Where to place v32f32 to distinguish between the two?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 11, 2017 at 7:55 PM, Craig Topper <span dir="ltr"><<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">You need a type inside this bitconvert. The outer type is the destination type for the bitconvert but it also needs an input type</div><span><div dir="auto"><br></div><div dir="auto"><span style="color:rgb(49,49,49);word-spacing:1px;background-color:rgb(255,255,255)">(store (v32i32 (bitconvert VRR128:$src)), addr:$dst)</span><br></div><br></span><div><div class="m_-876871491016103628h5"><div class="gmail_quote"><div>On Tue, Jul 11, 2017 at 7:27 AM hameeza ahmed <<a href="mailto:hahmed2305@gmail.com" target="_blank">hahmed2305@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>hello,<div>i need to use v32i32 and v32f32 in store instructions.</div><div>I defined my register as;</div><div><br></div><div><div>def VRR128 : RegisterClass<"X86", [v32i32, v32f32],</div><div>                          1024, (add R_0_V_0, R_1_V_0, R_2_V_0)>;</div></div><div><br></div><div><div>def STORE_DWORD : I<0x70, MRMDestMem, (outs), (ins i2048mem:$dst, VRR128:$src),</div><div>                    "STORE_DWORD\t{$src, $dst|$dst, $src}",</div><div>                    [(store (v32i32 (bitconvert VRR128:$src)), addr:$dst)], IIC_MOV_MEM>, TA;</div><div><br></div><div><br></div><div><br></div><div>def: Pat<(store (v32f32 (bitconvert (VRR128:$src))), addr:$dst), (STORE_DWORD addr:$dst, VRR128:$src)>;</div></div><div><br></div><div>but getting the following error;</div><div>STORE_DWORD: <span style="white-space:pre-wrap">  </span>(st (bitconvert:v32i32 VRR128:{v32i32:v32f32}:$src), addr:iPTR:$dst)<<P:Predicate_u<wbr>nindexedstore>><<P:Predicate_s<wbr>tore>><br></div><div><div>Included from /PIM/lib/Target/X86/X86.td:832<wbr>:</div><div>/lib/Target/X86/X86InstrInfo.t<wbr>d:3166:1: error: In STORE_DWORD: Could not infer all types in pattern!</div><div>def STORE_DWORD : I<0x70, MRMDestMem, (outs), (ins i2048mem:$dst, VRR128:$src),</div><div>^</div><div>anonymous_4820: /PIM/lib/Target/X86/X86.td:832<wbr>:</div><div>/lib/Target/X86/X86InstrInfo.t<wbr>d:3173:1: error: In anonymous_4820: Unrecognized node 'VRR128'!</div><div><br></div></div><div>Please help.</div><div><br></div><div>Thank You</div><div><br></div></div>
</blockquote></div></div></div></div><span class="m_-876871491016103628HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature">~Craig</div>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>