Thanks!<br><div class="gmail_quote"><div dir="ltr">On Mon, 24 Oct 2016 at 19:31, Friedman, Eli via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
<div class="m_2556558767835360355moz-cite-prefix gmail_msg">r284993.</div></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><div class="m_2556558767835360355moz-cite-prefix gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
-Eli</div></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg"><div class="m_2556558767835360355moz-cite-prefix gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
On 10/24/2016 10:22 AM, James Molloy wrote:<br class="gmail_msg">
</div></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
<blockquote type="cite" class="gmail_msg">Hi Eli, <br class="gmail_msg">
<br class="gmail_msg">
Sorry about that! I'm on vacation for a few days with no SVN
access- if it's blocking you please feel free to revert and I'll
look at it on Thursday. <br class="gmail_msg">
<br class="gmail_msg">
Thanks,<br class="gmail_msg">
<br class="gmail_msg">
James<br class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div dir="ltr" class="gmail_msg">On Mon, 24 Oct 2016 at 19:20, Friedman, Eli via
llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a>>
wrote:<br class="gmail_msg">
</div>
<blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On
10/22/2016 2:58 AM, James Molloy via llvm-commits wrote:<br class="gmail_msg">
> Author: jamesm<br class="gmail_msg">
> Date: Sat Oct 22 04:58:37 2016<br class="gmail_msg">
> New Revision: 284917<br class="gmail_msg">
><br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=284917&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=284917&view=rev</a><br class="gmail_msg">
> Log:<br class="gmail_msg">
> [ARM] Fix crash in ConstantIslands<br class="gmail_msg">
><br class="gmail_msg">
> tPCRelJT may not be the first instruction in a block.
Check that instead of dereferencing a broken iterator.<br class="gmail_msg">
<br class="gmail_msg">
Thanks for the fix... but this exposes more problems.<br class="gmail_msg">
<br class="gmail_msg">
It looks like the jump tables being generated by this
optimization<br class="gmail_msg">
aren't properly aligned; with -no-integrated-as, I'm getting
errors like<br class="gmail_msg">
"Error: invalid immediate for address calculation (value =<br class="gmail_msg">
0x00000006)". I haven't reduced a testcase yet, but it's
triggering on<br class="gmail_msg">
a bunch of SPEC tests, so it shouldn't be hard to reproduce.<br class="gmail_msg">
<br class="gmail_msg">
-Eli<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
><br class="gmail_msg">
> Added:<br class="gmail_msg">
> llvm/trunk/test/CodeGen/ARM/constant-island-crash.ll<br class="gmail_msg">
> Modified:<br class="gmail_msg">
> llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp<br class="gmail_msg">
><br class="gmail_msg">
> Modified:
llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=284917&r1=284916&r2=284917&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=284917&r1=284916&r2=284917&view=diff</a><br class="gmail_msg">
>
==============================================================================<br class="gmail_msg">
> --- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
(original)<br class="gmail_msg">
> +++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
Sat Oct 22 04:58:37 2016<br class="gmail_msg">
> @@ -2048,7 +2048,9 @@ bool
ARMConstantIslands::optimizeThumb2J<br class="gmail_msg">
> // %base = tLEApcrelJT<br class="gmail_msg">
> // %t = tLDRr %idx, %base<br class="gmail_msg">
> unsigned BaseReg =
User.MI->getOperand(0).getReg();<br class="gmail_msg">
> -<br class="gmail_msg">
> +<br class="gmail_msg">
> + if (User.MI->getIterator() ==
User.MI->getParent()->begin())<br class="gmail_msg">
> + continue;<br class="gmail_msg">
> MachineInstr *Shift = User.MI->getPrevNode();<br class="gmail_msg">
> if (Shift->getOpcode() != ARM::tLSLri ||<br class="gmail_msg">
> Shift->getOperand(3).getImm() != 2 ||<br class="gmail_msg">
><br class="gmail_msg">
> Added:
llvm/trunk/test/CodeGen/ARM/constant-island-crash.ll<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/constant-island-crash.ll?rev=284917&view=auto" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/constant-island-crash.ll?rev=284917&view=auto</a><br class="gmail_msg">
>
==============================================================================<br class="gmail_msg">
> --- llvm/trunk/test/CodeGen/ARM/constant-island-crash.ll
(added)<br class="gmail_msg">
> +++ llvm/trunk/test/CodeGen/ARM/constant-island-crash.ll
Sat Oct 22 04:58:37 2016<br class="gmail_msg">
> @@ -0,0 +1,43 @@<br class="gmail_msg">
> +; RUN: llc < %s<br class="gmail_msg">
> +; No FileCheck - testing for crash.<br class="gmail_msg">
> +<br class="gmail_msg">
> +target datalayout =
"e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"<br class="gmail_msg">
> +target triple = "thumbv5e-none-linux-gnueabi"<br class="gmail_msg">
> +<br class="gmail_msg">
> +%struct.blam = type { [4 x %struct.eggs], [6 x [15 x
i16]], [6 x i32], i32, i32, i32, i32, i32, i32, %struct.eggs,
[4 x %struct.eggs], [4 x %struct.eggs], [4 x i32], i32, i32,
i32, [4 x %struct.eggs], [4 x %struct.eggs], i32,
%struct.eggs, i32 }<br class="gmail_msg">
> +%struct.eggs = type { i32, i32 }<br class="gmail_msg">
> +<br class="gmail_msg">
> +define void @spam(%struct.blam* %arg, i32 %arg1) {<br class="gmail_msg">
> +bb:<br class="gmail_msg">
> + %tmp = getelementptr inbounds %struct.blam,
%struct.blam* %arg, i32 undef, i32 2, i32 %arg1<br class="gmail_msg">
> + switch i32 %arg1, label %bb8 [<br class="gmail_msg">
> + i32 0, label %bb2<br class="gmail_msg">
> + i32 1, label %bb3<br class="gmail_msg">
> + i32 2, label %bb4<br class="gmail_msg">
> + i32 3, label %bb5<br class="gmail_msg">
> + i32 4, label %bb6<br class="gmail_msg">
> + i32 5, label %bb7<br class="gmail_msg">
> + ]<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb2: ;
preds = %bb<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb3: ;
preds = %bb<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb4: ;
preds = %bb<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb5: ;
preds = %bb<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb6: ;
preds = %bb<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb7: ;
preds = %bb<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +<br class="gmail_msg">
> +bb8: ;
preds = %bb<br class="gmail_msg">
> + store i32 1, i32* %tmp, align 4<br class="gmail_msg">
> + unreachable<br class="gmail_msg">
> +}<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> llvm-commits mailing list<br class="gmail_msg">
> <a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Employee of Qualcomm Innovation Center, Inc.<br class="gmail_msg">
Qualcomm Innovation Center, Inc. is a member of Code Aurora
Forum, a Linux Foundation Collaborative Project<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote>
</div>
</blockquote>
<br class="gmail_msg">
<p class="gmail_msg"><br class="gmail_msg">
</p>
<pre class="m_2556558767835360355moz-signature gmail_msg" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
</div>
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div>