<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ah, OK. I think I understand much better now. Thanks! You shouldn't need bundles for that sort of thing. A custom lowering or a fancy pattern should be sufficient, depending on the details of how your target is defined.<div><br></div><div>For patterns, looks at the various targets use of the Pat<>, Pattern<>, ComplexPattern<> and related classes in the .td files.</div><div><br></div><div><div>For examples of custom lowerings, have a look at how other targets handle any operations marked in <TargetName>ISelLowering.cpp as "Custom" operation actions.<div><br></div><div>-Jim<br><div><br><div><div>On Dec 20, 2011, at 6:57 PM, girish gulawani wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><br></span></div><div><span>Hi, Jim.</span></div><div><span>In my case the target (Tilera) doesn't have a full 32-bit mult operation and to do so it has to accumulate results from three 16-bit mults, by retaining operands and the result across in the same registers. However the ISel DAG thinks its a CSE case. Please note this is not a MAdd/MSub triad.</span></div><div><span><br></span></div><div><span>How could I do this by defining such a sequence or the pattern in the .def file itself for the ISD::MUL?</span></div><div>Thanks.</div><div>Girish.</div><div><br></div><div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family:
'times new roman', 'new york', times, serif; "> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Jim Grosbach <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>><br> <b><span style="font-weight: bold;">To:</span></b> girish gulawani <<a href="mailto:girishvg@yahoo.com">girishvg@yahoo.com</a>> <br><b><span style="font-weight: bold;">Cc:</span></b> Johannes Birgmeier <<a href="mailto:e0902998@student.tuwien.ac.at">e0902998@student.tuwien.ac.at</a>>; LLVM Developers Mailing List <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, 21 December 2011 12:41 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [LLVMdev] Stop MachineCSE on certain instructions<br> </font> <br>Hi Girish,<br><br>Sorry, but I'm afraid I don't understand your question. Can you elaborate a bit?<br><br>-Jim<br><br>On Dec 19, 2011, at 9:12 PM, girish gulawani wrote:<br><br>> <br>> Hello Jim.<br>> Just out of curiosity, won't such mechanism work via the patterns from
instructions defs?<br>> <br>> Thanks.<br>> Girish.<br>> <br>> From: Jim Grosbach <<a ymailto="mailto:grosbach@apple.com" href="mailto:grosbach@apple.com">grosbach@apple.com</a>><br>> To: Johannes Birgmeier <<a ymailto="mailto:e0902998@student.tuwien.ac.at" href="mailto:e0902998@student.tuwien.ac.at">e0902998@student.tuwien.ac.at</a>> <br>> Cc: LLVM Developers Mailing List <<a ymailto="mailto:llvmdev@cs.uiuc.edu" href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>> <br>> Sent: Monday, 19 December 2011 10:33 PM<br>> Subject: Re: [LLVMdev] Stop MachineCSE on certain instructions<br>> <br>> Hi Johannes,<br>> <br>> You may be interested in the (very) recently added explicit instruction bundle support. For an example of their usage, have a look at the ARM backend's IT-block (Thumb2 predication support) pass, which uses them to tie instructions together.<br>> <br>> -Jim<br>> <br>> On
Dec 17, 2011, at 12:24 PM, Johannes Birgmeier wrote:<br>> <br>> > Hello,<br>> > <br>> > I'm writing for a backend and have a complicated instruction bundle (3 <br>> > instructions) that has to be executed like a single block (meaning: if <br>> > the first instruction is executed, all three have to be executed to <br>> > obtain the result, though not necessarily without other instructions in <br>> > between). Unfortunately, MachineCSE gets in the way sometimes and rips <br>> > it apart.<br>> > <br>> > Is there a way to stop CSE from doing its thing (common subexpression <br>> > elimination) for certain instructions?<br>> > <br>> > I've already tried glueing (gluing?) them together, but that doesn't <br>> > seem to make a difference.<br>> > <br>> > Regards,<br>> > Johannes Birgmeier<br>> > _______________________________________________<br>>
> LLVM Developers mailing list<br>> > <a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>> <br>> _______________________________________________<br>> LLVM Developers mailing list<br>> <a ymailto="mailto:LLVMdev@cs.uiuc.edu" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>> <br>> <br><br><br><br> </div> </div> </blockquote></div> </div></div></blockquote></div><br></div></div></div></div></body></html>