<div class="gmail_quote">On Sun, Jan 15, 2012 at 11:45 PM, Jonathan Ragan-Kelley <span dir="ltr"><<a href="mailto:jrk@csail.mit.edu">jrk@csail.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div>Loads (on ptx64) with an sext of a computed index operand fail instruction selection:</div><div><br></div><div><div>LLVM ERROR: Cannot select: 0x7ff01401c210: i64,ch = load 0x10580e820, 0x7ff01401b510, 0x7ff01401b910<LD4[%memref1], sext from i32> [ID=8]</div>
<div> 0x7ff01401b510: i64 = PTXISD::LOAD_PARAM 0x10580e820, 0x7ff01401b410 [ORD=2] [ID=6]</div><div> 0x7ff01401b910: i64 = undef [ORD=4] [ID=3]</div></div><div><br></div><div>This is for code of the form:</div><div><br>
</div><div> %ptr = gep i64* %base, <i style="font-weight:bold">i32</i> %offset</div><div> %v = load i64* %ptr</div><div><br></div><div>when the offset gets directly inlined into the selection DAG slot of the load during lowering. If it's managed to be stored off in a vreg or something first (like if it's common subexpression eliminated with another sext of the same value to i64 that gets used before), this doesn't happen and codegen works fine.</div>
<div><br></div><div>The attached trivial ll fails with llc -march=ptx64, and works if either of the "works" paths is uncommented instead of "breaks".</div></div><div><br></div><div>Any suggestions for where to look would be hugely appreciated. This has crept out from the closed just in time to bite me before a major paper deadline on Tuesday.</div>
</div></blockquote><div><br></div><div>FYI: Patch sent to Jonathan. More "official" fix will be committed later this week....</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div>Thanks.</div><div><br></div></div><br><div style="word-wrap:break-word"></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a 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></blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>