<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 - SplitVecOp_EXTRACT_VECTOR_ELT - Invalid vector index!"
   href="https://bugs.llvm.org/show_bug.cgi?id=40267">40267</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SplitVecOp_EXTRACT_VECTOR_ELT - Invalid vector index!
          </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>Backend: WebAssembly
          </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>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reduced from <a href="https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12437">https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12437</a>

; ModuleID = 'bugpoint-reduced-simplified.bc'
source_filename = "llvm/test/Transforms/InstCombine/fold-vector-select.ll"
target triple = "wasm32-unknown-unknown"

define void @foo() {
  %L6 = load i32, i32* undef
  br label %BB1

BB1:                                              ; preds = %BB1, %0
  %bj = select <4 x i1> <i1 true, i1 true, i1 false, i1 false>, <4 x i32> <i32
55, i32 21, i32 92, i32 68>, <4 x i32> <i32 51, i32 61, i32 62, i32 39>
  %E1 = extractelement <4 x i32> %bj, i32 0
  %E23 = extractelement <4 x i32> zeroinitializer, i32 %E1
  %I33 = insertelement <4 x i32> undef, i32 %E23, i1 undef
  store <4 x i32> %I33, <4 x i32>* undef
  br label %BB1
}

llc -mtriple=wasm32 bugpoint-reduced-simplified.bc -o -
        .text
        .file   "fold-vector-select.ll"
llc: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1923: llvm::SDValue
llvm::DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT(llvm::SDNode*): Assertion
`IdxVal < VecVT.getVectorNumElements() && "Invalid vector index!"' failed.</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>