<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 10/06/12 03:01, Jakob Stoklund Olesen wrote:
    <blockquote cite="mid:C23AAEB7-4A49-415E-9C3C-545CDB520D34@2pi.dk"
      type="cite"><br>
      <div>
        <div>On Jun 8, 2012, at 6:18 AM, James Benton wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite">
          <div>Fixed the following crash in llvm::APInt::lshr when
            shiftAmt > BitWidth.<br>
            Added a test which causes this crash.<br>
            <br>
            Program received signal SIGSEGV, Segmentation fault.<br>
            0x0000000000ff5c9d in llvm::APInt::lshr
            (this=0x7fffffffc880, shiftAmt=160)<br>
               at
            /home/james/private_vmware/llvm/lib/Support/APInt.cpp:1173<br>
            1173                 (pVal[i+offset+1] <<
            (APINT_BITS_PER_WORD - wordShift));<br>
            <br>
            <br>
            #0  0x0000000000ff5c9d in llvm::APInt::lshr
            (this=0x7fffffffc870, shiftAmt=160)<br>
               at llvm/lib/Support/APInt.cpp:1173<br>
            #1  0x00000000009168d2 in (anonymous
            namespace)::DAGCombiner::visitAND (this=0x7fffffffcf90,
            N=0x181b3c0)<br>
               at llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2496<br>
            <span><diff.txt></span>_______________________________________________<br>
            llvm-commits mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
            <a class="moz-txt-link-freetext"
              href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
          </div>
        </blockquote>
      </div>
      <div><br>
      </div>
      <div>The test is failing here: <a moz-do-not-send="true"
          href="http://lab.llvm.org:8011/builders/llvm-arm-linux/builds/1170">http://lab.llvm.org:8011/builders/llvm-arm-linux/builds/1170</a></div>
      <br>
      <div>
        <pre style="font-family: 'Courier New', courier, monotype, monospace; "><span class="stdout" style="font-family: 'Courier New', courier, monotype, monospace; color: black; ">******************** TEST 'LLVM :: CodeGen/Generic/2012-06-08-APIntCrash.ll' FAILED ********************Script:
--
/wd/buildbot/llvm-arm-linux/llvm/Debug+Asserts/bin/llc < /wd/buildbot/llvm-arm-linux/llvm/test/CodeGen/Generic/2012-06-08-APIntCrash.ll
--
Exit Code: 134
Command Output (stderr):
--
Return operand #4 has unhandled type i32UNREACHABLE executed at CallingConvLower.cpp:112!
0  llc       0x01208534
1  llc       0x01208ebc
2  libc.so.6 0x4021cc10 __default_sa_restorer_v2 + 0
Stack dump:
0.      Program arguments: /wd/buildbot/llvm-arm-linux/llvm/Debug+Asserts/bin/llc 
1.      Running pass 'Function Pass Manager' on module '<stdin>'.
2.      Running pass 'ARM Instruction Selection' on function '@test1'
/wd/buildbot/llvm-arm-linux/llvm/test/CodeGen/Generic/Output/2012-06-08-APIntCrash.ll.script: line 2: 29742 Aborted                 '/wd/buildbot/llvm-arm-linux/llvm/Debug+Asserts/bin/llc' < '/wd/buildbot/llvm-arm-linux/llvm/test/CodeGen/Generic/2012-06-08-APIntCrash.ll'
--

********************
</span></pre>
      </div>
      <div><span class="stdout" style="font-family: 'Courier New',
          courier, monotype, monospace; color: black; "><br>
        </span></div>
    </blockquote>
    <br>
    I have modified the test to the following (there is also a diff
    attached).<br>
    Verified to compile with ARM and still able to produce a crash using
    this test before my patch.<br>
    <br>
    ; RUN: llc < %s<br>
    <br>
    define void @test1(<8 x i32>* %ptr)<br>
    {<br>
        %1 = load <8 x i32>* %ptr, align 32<br>
        %2 = and <8 x i32> %1, <i32 0, i32 0, i32 0, i32 -1,
    i32 0, i32 0, i32 0, i32 -1><br>
        store <8 x i32> %2, <8 x i32>* %ptr, align 16<br>
        ret void<br>
    }<br>
    <br>
  </body>
</html>