<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - isGuaranteedNotToBeUndefOrPoison - ASSERT: Val && "isa<> used on a null pointer""
   href="https://bugs.llvm.org/show_bug.cgi?id=46831">46831</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>isGuaranteedNotToBeUndefOrPoison  - ASSERT: Val && "isa<> used on a null pointer"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>juneyoung.lee@sf.snu.ac.kr, llvm-bugs@lists.llvm.org, nikita.ppv@gmail.com, spatel+llvm@rotateright.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reduced from: <a href="https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24278">https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24278</a>

define void @OSSFuzz24278() {
entry:
  %B9 = sdiv i16 -32768, 256
  %L3 = load i64, i64* undef, align 4
  %B3 = sub i16 0, %B9
  %i = insertelement <4 x i16> undef, i16 %B3, i32 3
  %i1 = sub <4 x i16> zeroinitializer, %i
  %i2 = sext <4 x i16> %i1 to <4 x i32>
  %i3 = getelementptr inbounds i64, i64* null, <4 x i32> %i2
  %I6 = insertelement <4 x i64*> %i3, i64* undef, i64 %L3
  ret void
}

opt -gvn -mtriple=x86_64--

opt: /home/simon/LLVM/llvm-project/llvm/include/llvm/Support/Casting.h:104:
static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
llvm::UndefValue; From = llvm::Constant]: Assertion `Val && "isa<> used on a
null pointer"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: opt -gvn fuzz24278.ll -S -o -
1.      Running pass 'Function Pass Manager' on module 'fuzz24278.ll'.
2.      Running pass 'Global Value Numbering' on function '@PR38984'
opt(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x2a)[0x7f5220f4e19a]
opt(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x7f5220f4bf94]
opt(+0x294c975)[0x7f5220f4c975]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f521dff2890]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f521d0bee97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f521d0c0801]
/lib/x86_64-linux-gnu/libc.so.6(+0x3039a)[0x7f521d0b039a]
/lib/x86_64-linux-gnu/libc.so.6(+0x30412)[0x7f521d0b0412]
opt(+0x212c263)[0x7f522072c263]
opt(+0x213f0f6)[0x7f522073f0f6]
opt(_ZN4llvm32isGuaranteedNotToBeUndefOrPoisonEPKNS_5ValueEPKNS_11InstructionEPKNS_13DominatorTreeEj+0xcc)[0x7f5220205e1c]
opt(_ZN4llvm25SimplifyInsertElementInstEPNS_5ValueES1_S1_RKNS_13SimplifyQueryE+0x11e)[0x7f522008496e]
opt(_ZN4llvm19SimplifyInstructionEPNS_11InstructionERKNS_13SimplifyQueryEPNS_25OptimizationRemarkEmitterE+0x2b6)[0x7f5220096826]</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>