<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 26, 2013, at 11:51 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">On Tue, Feb 26, 2013 at 11:48 AM, Chad Rosier <<a href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>> wrote:<br><blockquote type="cite"><br>On Feb 25, 2013, at 6:33 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br><br><br><br><br>On Mon, Feb 25, 2013 at 5:05 PM, Chad Rosier <<a href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>> wrote:<br><blockquote type="cite"><br>Author: mcrosier<br>Date: Mon Feb 25 19:05:31 2013<br>New Revision: 176066<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=176066&view=rev">http://llvm.org/viewvc/llvm-project?rev=176066&view=rev</a><br>Log:<br>[fast-isel] Make sure the FastLowerArguments function checks to make sure<br>the<br>arguments type is a simple type.<br><a href="rdar://13290455">rdar://13290455</a><br></blockquote><br><br>Test case?<br><br><br>David,<br>I'm not aware of an easy way to test this.<br><br>; RUN: not llc < %s -fast-isel -fast-isel-abort -fast-isel-abort-args<br>-verify-machineinstrs -mtriple=x86_64-apple-darwin10<br><br>; Abort because we don't know how to handle non-simple type i31.<br>define i31 @t1(i31 %a, i31 %b, i31 %c) {<br>entry:<br> %add = add nsw i31 %b, %a<br> %add1 = add nsw i31 %add, %c<br> ret i31 %add1<br>}<br><br>The above test case will exercise the issue, but results in llc aborting and<br>the 'not' on the run line doesn't have the correct effect.<br></blockquote><br>I'm by no means especially familiar with the backend, just looking at<br>the change it seemed like something that I would expect to have an<br>easily observable effect.<br></div></blockquote><div><br></div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">I assume the -fast-isel-abort-args/-fast-isel-abort is what's meant to<br>cause the abort if fast isel can't handle something? </div></blockquote><div><br></div><div>Correct.</div><div><br></div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Do we produce the<br>same code before/after your change, but the only issue is that<br>previously we would do it with fast isel & now we don't? </div></blockquote><div><br></div><div>No, this was causing an assert when ArgVT.getSimpleVT() was called.</div><div><br></div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">What was the<br>correctness problem (why make any change at all) then? If there was a<br>correctness problem, can't we just test that in the actually assembly<br>output rather than testing whether fast isel aborts?<br></div></blockquote><div><br></div><div>The issue was a compiler assertion.</div><div><br></div><div>I could just remove the -fast-isel-abort-args flag to avoid causing the abort.  Would that suffice as a test?</div><div>I could comment that this previously caused an assert.</div><div><br></div> Chad</div><div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">- David<br><br><blockquote type="cite"><br>Chad<br><br><br><blockquote type="cite"><br><br>Modified:<br>   llvm/trunk/lib/Target/ARM/ARMFastISel.cpp<br>   llvm/trunk/lib/Target/X86/X86FastISel.cpp<br><br>Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=176066&r1=176065&r2=176066&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=176066&r1=176065&r2=176066&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)<br>+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Mon Feb 25 19:05:31 2013<br>@@ -2922,6 +2922,7 @@ bool ARMFastISel::FastLowerArguments() {<br>      return false;<br><br>    EVT ArgVT = TLI.getValueType(ArgTy);<br>+    if (!ArgVT.isSimple()) return false;<br>    switch (ArgVT.getSimpleVT().SimpleTy) {<br>    case MVT::i8:<br>    case MVT::i16:<br><br>Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=176066&r1=176065&r2=176066&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=176066&r1=176065&r2=176066&view=diff</a><br><br>==============================================================================<br>--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)<br>+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Mon Feb 25 19:05:31 2013<br>@@ -1555,6 +1555,7 @@ bool X86FastISel::FastLowerArguments() {<br>      return false;<br><br>    EVT ArgVT = TLI.getValueType(ArgTy);<br>+    if (!ArgVT.isSimple()) return false;<br>    switch (ArgVT.getSimpleVT().SimpleTy) {<br>    case MVT::i32:<br>    case MVT::i64:<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></blockquote></div></blockquote></div><br></body></html>