<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - opt crash"
   href="http://llvm.org/bugs/show_bug.cgi?id=21651">21651</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>opt crash
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>regehr@cs.utah.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>regehr@regehr-M51AC:~$ llvm-as < foo.ll | opt -O3
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

#0 0x137f812 llvm::sys::PrintStackTrace(_IO_FILE*)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x137f812)
#1 0x137d9a1 SignalHandler(int)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x137d9a1)
#2 0x7f3583734340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#3 0xfcd050 llvm::DataLayout::getLargestLegalIntTypeSize() const
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0xfcd050)
#4 0x1106f0e llvm::InstCombiner::visitSwitchInst(llvm::SwitchInst&)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x1106f0e)
#5 0x1110eee llvm::InstCombiner::DoOneIteration(llvm::Function&, unsigned int)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x1110eee)
#6 0x1111e18 llvm::InstCombiner::runOnFunction(llvm::Function&)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x1111e18)
#7 0x107644f llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x107644f)
#8 0x10b2d29 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x10b2d29)
#9 0x1076bfd llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x1076bfd)
#10 0x604a5f main
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x604a5f)
#11 0x7f3582934ec5 __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:321:0
#12 0x627e01 _start
(/home/regehr/z/compiler-install/llvm-r222644-install/bin/opt+0x627e01)
Stack dump:
0.    Program arguments: opt -O3 
1.    Running pass 'CallGraph Pass Manager' on module '<stdin>'.
2.    Running pass 'Combine redundant instructions' on function '@foo'
Segmentation fault (core dumped)


regehr@regehr-M51AC:~$ opt --version
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
  LLVM version 3.6.0svn
  Optimized build with assertions.
  Built Nov 23 2014 (21:45:31).
  Default target: x86_64-unknown-linux-gnu
  Host CPU: core-avx2


regehr@regehr-M51AC:~$ cat foo.ll
@dummy1 = global i32 0, align 4
@dummy2 = global i32 0, align 4
@dummy3 = global i32 0, align 4
define void @foo(i64 %x1) {
foo0:
  %0 = and i64 3, %x1
  %1 = icmp eq i64 2, %0
  %2 = icmp eq i64 0, %0
  %3 = and i64 1, %x1
  %tmp0 = icmp eq i1 0, %1
  br i1 %tmp0, label %cont0, label %out
cont0:
  %tmp1 = icmp eq i1 0, %2
  br i1 %tmp1, label %cont1, label %out
cont1:
  %cand = icmp eq i64 1, %3
  br i1 %cand, label %return, label %dead
return:
  %dummy1w = atomicrmw add i32* @dummy1, i32 1 monotonic
  ret void
dead:
  %dummy2w = atomicrmw add i32* @dummy2, i32 1 monotonic
  ret void
out:
  %dummy3w = atomicrmw add i32* @dummy3, i32 1 monotonic
  ret void
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>