<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">You can use a cast, and force one type in the pattern, then use the other one in a Pat:<br>
<br>
def VGETITEM:<br>
  [(set GPR:$rD, (extractelt (v4i32 VR:$rA), GPR:$rB))]<br>
<br>
def: Pat<(extractelt (v4f32 VR:$rA), GPR:$rB)),<br>
         (VGETITEM VR:$rA, GPR:$rB)>;<br>
<br>
-Krzysztof<span class=""><font color="#888888"><br>
<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</font></span></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">Krzysztof,<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm curious how do you know LLVM so well? Most of the times your answers are exactly what I need. I was recommended to read code (as usual), however it is challenging without knowing what the code is trying to express. IMHO it is better to have a concept first and then express it in code. I've been trying to find books, tutorials, etc, but there doesn't seem to be good examples out there. Basically my questions are:</div><div class="gmail_extra"><br></div><div class="gmail_extra">1. What is your adivce on learning LLVM (and compiler design)?</div><div class="gmail_extra">2. Is there a way to do quickly and efficiently or I will just have to suffer through several years of painstaking trial and error as well as my own research on the topic?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Any help is appreciated.</div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div>