Bug type: crash
Component: SLPVectorizer
Bug location: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp: BoUpSLP::vectorizeTree
Issue title: [SLP] Assertion `I >= 0 && I < (NumOpElts * 2) && "Out-of-bounds shuffle mask element"' failed.
Labels: llvm:SLPVectorizer
crash-on-valid
Reported by: rupprecht

Live link: https://godbolt.org/z/nePMscjGr

Test case:

```ll
define void @func(i32 %0) {
  %2 = shl i32 %0, 0
  %3 = sext i32 %2 to i64
  %4 = shl i32 0, 0
  %5 = sext i32 %4 to i64
  %6 = or i32 0, 0
  %7 = or i32 0, 0
  %8 = zext i32 %6 to i64
  %9 = zext i32 %7 to i64
  %10 = zext i32 0 to i64
  %11 = zext i32 0 to i64
  %12 = zext i32 0 to i64
  %13 = zext i32 0 to i64
  %14 = zext i32 0 to i64
  %15 = zext i32 0 to i64
  %16 = zext i32 0 to i64
  %17 = zext i32 0 to i64
  %18 = zext i32 0 to i64
  %19 = zext i32 0 to i64
  %20 = zext i32 0 to i64
  %21 = zext i32 0 to i64
  %22 = zext i32 0 to i64
  %23 = zext i32 0 to i64
  %24 = zext i32 0 to i64
  %25 = zext i32 0 to i64
  %26 = zext i32 0 to i64
  %27 = or i64 %3, 0
  %28 = or i64 %3, %8
  %29 = or i64 %3, %9
  %30 = or i64 %3, %10
  %31 = or i64 %3, %11
  %32 = or i64 %3, %12
  %33 = or i64 %3, %13
  %34 = or i64 %3, %14
  %35 = or i64 %3, %15
  %36 = or i64 %3, %16
  %37 = or i64 %3, %17
  %38 = or i64 %3, %18
  %39 = or i64 %3, %19
  %40 = or i64 %3, %20
  %41 = or i64 %3, %21
  %42 = or i64 %3, %22
  %43 = or i64 %3, %23
  %44 = or i64 %3, %24
  %45 = or i64 %3, %25
  %46 = or i64 %3, 0
  %47 = or i64 %3, 0
  %48 = or i64 %3, 0
  %49 = or i64 %3, 0
  %50 = or i64 %3, 0
  %51 = or i64 %3, 0
  %52 = or i64 %3, 0
  %53 = or i64 %3, 0
  %54 = or i64 %3, 0
  %55 = or i64 %3, 0
  %56 = or i64 %3, 0
  %57 = or i64 %3, 0
  %58 = or i64 %3, 0
  %59 = icmp slt i64 %28, 0
  %60 = icmp slt i64 %29, 0
  %61 = icmp slt i64 %30, 0
  %62 = icmp slt i64 %31, 0
  %63 = icmp slt i64 %32, 0
  %64 = icmp slt i64 %33, 0
  %65 = icmp slt i64 %34, 0
  %66 = icmp slt i64 %35, 0
  %67 = icmp slt i64 %36, 0
  %68 = icmp slt i64 %37, 0
  %69 = icmp slt i64 %38, 0
  %70 = icmp slt i64 %39, 0
  %71 = icmp slt i64 %40, 0
  %72 = icmp slt i64 %41, 0
  %73 = icmp slt i64 %42, 0
  %74 = icmp slt i64 %43, 0
  %75 = icmp slt i64 %44, 0
  %76 = icmp slt i64 %45, 0
  %77 = icmp slt i64 %46, 0
  %78 = icmp slt i64 %47, 0
  %79 = icmp slt i64 %48, 0
  %80 = icmp slt i64 %49, 0
  %81 = icmp slt i64 %50, 0
  %82 = icmp slt i64 %51, 0
  %83 = icmp slt i64 %52, 0
  %84 = icmp slt i64 %53, 0
  %85 = icmp slt i64 %54, 0
  %86 = icmp slt i64 %55, 0
  %87 = icmp slt i64 %56, 0
  %88 = icmp slt i64 %57, 0
  %89 = icmp slt i64 %58, 0
  %90 = and i1 false, %59
  %91 = and i1 false, %60
  %92 = and i1 false, %61
  %93 = and i1 false, %62
  %94 = and i1 false, %63
  %95 = and i1 false, %64
  %96 = and i1 false, %65
  %97 = and i1 false, %66
  %98 = and i1 false, %67
  %99 = and i1 false, %68
  %100 = and i1 false, %69
  %101 = and i1 false, %70
  %102 = and i1 false, %71
  %103 = and i1 false, %72
  %104 = and i1 false, %73
  %105 = and i1 false, %74
  %106 = and i1 false, %75
  %107 = and i1 false, %76
  %108 = icmp eq i32 %2, 0
  %109 = and i1 false, %77
  %110 = and i1 false, %78
  %111 = and i1 false, %79
  %112 = and i1 false, %80
  %113 = and i1 false, %81
  %114 = and i1 false, %82
  %115 = and i1 false, %83
  %116 = and i1 false, %84
  %117 = and i1 false, %85
  %118 = and i1 false, %86
  %119 = or i64 %5, %26
  %120 = getelementptr float, ptr addrspace(1) null, i64 %119
  %121 = icmp slt i64 %119, 0
  ret void
}
```

Running via `opt --passes=slp-vectorizer -slp-vectorize-hor=false`:

```sh
opt: /root/llvm-project/llvm/lib/IR/Instructions.cpp:1853: bool isSingleSourceMaskImpl(llvm::ArrayRef<int>, int): Assertion `I >= 0 && I < (NumOpElts * 2) && "Out-of-bounds shuffle mask element"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/opt -o /app/output.s -S --passes=slp-vectorizer -slp-vectorize-hor=false <source>
1.	Running pass "function(slp-vectorizer)" on module "<source>"
2.	Running pass "slp-vectorizer" on function "func"
 #0 0x0000000004fa4138 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4fa4138)
 #1 0x0000000004fa18ac SignalHandler(int) Signals.cpp:0:0
 #2 0x000073f701e42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x000073f701e969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x000073f701e42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x000073f701e287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x000073f701e2871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #7 0x000073f701e39e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #8 0x0000000004d097f6 isSingleSourceMaskImpl(llvm::ArrayRef<int>, int) Instructions.cpp:0:0
 #9 0x0000000004d1097a llvm::ShuffleVectorInst::isExtractSubvectorMask(llvm::ArrayRef<int>, int, int&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4d1097a)
#10 0x000000000400fc53 (anonymous namespace)::BaseShuffleAnalysis::isIdentityMask(llvm::ArrayRef<int>, llvm::FixedVectorType const*, bool) SLPVectorizer.cpp:0:0
#11 0x0000000004043781 (anonymous namespace)::BaseShuffleAnalysis::peekThroughShuffles(llvm::Value*&, llvm::SmallVectorImpl<int>&, bool) SLPVectorizer.cpp:0:0
#12 0x000000000405bd21 llvm::Value* (anonymous namespace)::BaseShuffleAnalysis::createShuffle<llvm::Value*, llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::ShuffleIRBuilder>(llvm::Value*, llvm::Value*, llvm::ArrayRef<int>, llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::ShuffleIRBuilder&) SLPVectorizer.cpp:0:0
#13 0x000000000405c50a llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::createShuffle(llvm::Value*, llvm::Value*, llvm::ArrayRef<int>) (.isra.0) SLPVectorizer.cpp:0:0
#14 0x000000000405ce73 llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::finalize(llvm::ArrayRef<int>, llvm::ArrayRef<std::pair<llvm::slpvectorizer::BoUpSLP::TreeEntry const*, unsigned int>>, unsigned int, llvm::function_ref<void (llvm::Value*&, llvm::SmallVectorImpl<int>&)>) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x405ce73)
#15 0x000000000405d3d9 llvm::slpvectorizer::BoUpSLP::vectorizeOperand(llvm::slpvectorizer::BoUpSLP::TreeEntry*, unsigned int, bool)::'lambda1'(llvm::Value*, llvm::ArrayRef<int>)::operator()(llvm::Value*, llvm::ArrayRef<int>) const SLPVectorizer.cpp:0:0
#16 0x0000000004095c0a llvm::slpvectorizer::BoUpSLP::vectorizeOperand(llvm::slpvectorizer::BoUpSLP::TreeEntry*, unsigned int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4095c0a)
#17 0x0000000004097032 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4097032)
#18 0x0000000004095aa8 llvm::slpvectorizer::BoUpSLP::vectorizeOperand(llvm::slpvectorizer::BoUpSLP::TreeEntry*, unsigned int, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4095aa8)
#19 0x0000000004097294 llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x4097294)
#20 0x00000000040b31cc llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::MapVector<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>, llvm::DenseMap<llvm::Value*, unsigned int, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, unsigned int>>, llvm::SmallVector<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>>, 0u>> const&, llvm::SmallVectorImpl<std::pair<llvm::Value*, llvm::Value*>>&, llvm::Instruction*) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x40b31cc)
#21 0x00000000040b6d45 llvm::slpvectorizer::BoUpSLP::vectorizeTree() (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x40b6d45)
#22 0x00000000040c3b2a llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x40c3b2a)
#23 0x00000000040c78a7 bool llvm::SLPVectorizerPass::vectorizeCmpInsts<std::reverse_iterator<llvm::CmpInst* const*>>(llvm::iterator_range<std::reverse_iterator<llvm::CmpInst* const*>>, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x40c78a7)
#24 0x00000000040cb5d0 llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x40cb5d0)
#25 0x00000000040d1d49 llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) (.part.0) SLPVectorizer.cpp:0:0
#26 0x00000000040d29fb llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/opt+0x40d29fb)
...
```

Bisected to f3d2609af3031ddb54030548e86335f295cf49ca / https://github.com/llvm/llvm-project/pull/104144

Comments: author: dklimkin
body: Confirmed this resolved the issue. Thanks!

Fix patch:
commit 87a988e881ac92e3d87aae01dc632f33c1fb36aa
Author: Alexey Bataev <a.bataev@outlook.com>
Date:   Fri Aug 30 05:16:57 2024 -0700

    [SLP]Fix PR106655: Use FinalShuffle for alternate cast nodes.
    
    Need to use FinalShuffle function for all vectorized results to
    correctly produce vectorized value.
    
    Fixes https://github.com/llvm/llvm-project/issues/106655

diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index edb2567fa057..345b01b82c6a 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -13137,7 +13137,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
   }
 
   bool IsReverseOrder = isReverseOrder(E->ReorderIndices);
-  auto FinalShuffle = [&](Value *V, const TreeEntry *E, VectorType *VecTy) {
+  auto FinalShuffle = [&](Value *V, const TreeEntry *E) {
     ShuffleInstructionBuilder ShuffleBuilder(ScalarTy, Builder, *this);
     if (E->getOpcode() == Instruction::Store &&
         E->State == TreeEntry::Vectorize) {
@@ -13197,7 +13197,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
                                PH->getParent()->getFirstInsertionPt());
         Builder.SetCurrentDebugLocation(PH->getDebugLoc());
 
-        V = FinalShuffle(V, E, VecTy);
+        V = FinalShuffle(V, E);
 
         E->VectorizedValue = V;
         if (PostponedPHIs)
@@ -13249,7 +13249,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       if (const TreeEntry *TE = getTreeEntry(V))
         V = TE->VectorizedValue;
       setInsertPointAfterBundle(E);
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
       E->VectorizedValue = V;
       return V;
     }
@@ -13259,7 +13259,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       Value *Ptr = LI->getPointerOperand();
       LoadInst *V = Builder.CreateAlignedLoad(VecTy, Ptr, LI->getAlign());
       Value *NewV = propagateMetadata(V, E->Scalars);
-      NewV = FinalShuffle(NewV, E, VecTy);
+      NewV = FinalShuffle(NewV, E);
       E->VectorizedValue = NewV;
       return NewV;
     }
@@ -13474,7 +13474,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       Value *V = (VecOpcode != ShuffleOrOp && VecOpcode == Instruction::BitCast)
                      ? InVec
                      : Builder.CreateCast(VecOpcode, InVec, VecTy);
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13518,7 +13518,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       propagateIRFlags(V, E->Scalars, VL0);
       // Do not cast for cmps.
       VecTy = cast<FixedVectorType>(V->getType());
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13571,7 +13571,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       assert(getNumElements(Cond->getType()) == TrueNumElements &&
              "Cannot vectorize Instruction::Select");
       Value *V = Builder.CreateSelect(Cond, True, False);
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13593,7 +13593,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       if (auto *I = dyn_cast<Instruction>(V))
         V = propagateMetadata(I, E->Scalars);
 
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13611,7 +13611,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       }
 
       Value *V = Builder.CreateFreeze(Op);
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13655,7 +13655,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
                 auto *CI = dyn_cast<ConstantInt>(Op);
                 return CI && CI->getValue().countr_one() >= It->second.first;
               })) {
-            V = FinalShuffle(I == 0 ? RHS : LHS, E, VecTy);
+            V = FinalShuffle(I == 0 ? RHS : LHS, E);
             E->VectorizedValue = V;
             ++NumVectorInstructions;
             return V;
@@ -13688,7 +13688,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
           I->setHasNoUnsignedWrap(/*b=*/false);
       }
 
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13780,7 +13780,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       }
       Value *V = propagateMetadata(NewLI, E->Scalars);
 
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
       E->VectorizedValue = V;
       ++NumVectorInstructions;
       return V;
@@ -13794,7 +13794,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       if (VecValue->getType() != VecTy)
         VecValue =
             Builder.CreateIntCast(VecValue, VecTy, GetOperandSignedness(0));
-      VecValue = FinalShuffle(VecValue, E, VecTy);
+      VecValue = FinalShuffle(VecValue, E);
 
       Value *Ptr = SI->getPointerOperand();
       Instruction *ST;
@@ -13859,7 +13859,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
         V = propagateMetadata(I, GEPs);
       }
 
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -13941,7 +13941,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
       Value *V = Builder.CreateCall(CF, OpVecs, OpBundles);
 
       propagateIRFlags(V, E->Scalars, VL0);
-      V = FinalShuffle(V, E, VecTy);
+      V = FinalShuffle(V, E);
 
       E->VectorizedValue = V;
       ++NumVectorInstructions;
@@ -14039,6 +14039,7 @@ Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
                      "Expected same type as operand.");
               if (auto *I = dyn_cast<Instruction>(LHS))
                 LHS = propagateMetadata(I, E->Scalars);
+              LHS = FinalShuffle(LHS, E);
               E->VectorizedValue = LHS;
               ++NumVectorInstructions;
               return LHS;


Regression tests:
file: llvm/test/Transforms/SLPVectorizer/resized-alt-shuffle-after-minbw.ll
commands: opt -S --passes=slp-vectorizer -slp-vectorize-hor=false < %s
tests: test_name: func
test_body: define void @func(i32 %0) {
  %2 = shl i32 %0, 0
  %3 = sext i32 %2 to i64
  %4 = shl i32 0, 0
  %5 = sext i32 %4 to i64
  %6 = or i32 0, 0
  %7 = or i32 0, 0
  %8 = zext i32 %6 to i64
  %9 = zext i32 %7 to i64
  %10 = zext i32 0 to i64
  %11 = zext i32 0 to i64
  %12 = zext i32 0 to i64
  %13 = zext i32 0 to i64
  %14 = zext i32 0 to i64
  %15 = zext i32 0 to i64
  %16 = zext i32 0 to i64
  %17 = zext i32 0 to i64
  %18 = zext i32 0 to i64
  %19 = zext i32 0 to i64
  %20 = zext i32 0 to i64
  %21 = zext i32 0 to i64
  %22 = zext i32 0 to i64
  %23 = zext i32 0 to i64
  %24 = zext i32 0 to i64
  %25 = zext i32 0 to i64
  %26 = zext i32 0 to i64
  %27 = or i64 %3, 0
  %28 = or i64 %3, %8
  %29 = or i64 %3, %9
  %30 = or i64 %3, %10
  %31 = or i64 %3, %11
  %32 = or i64 %3, %12
  %33 = or i64 %3, %13
  %34 = or i64 %3, %14
  %35 = or i64 %3, %15
  %36 = or i64 %3, %16
  %37 = or i64 %3, %17
  %38 = or i64 %3, %18
  %39 = or i64 %3, %19
  %40 = or i64 %3, %20
  %41 = or i64 %3, %21
  %42 = or i64 %3, %22
  %43 = or i64 %3, %23
  %44 = or i64 %3, %24
  %45 = or i64 %3, %25
  %46 = or i64 %3, 0
  %47 = or i64 %3, 0
  %48 = or i64 %3, 0
  %49 = or i64 %3, 0
  %50 = or i64 %3, 0
  %51 = or i64 %3, 0
  %52 = or i64 %3, 0
  %53 = or i64 %3, 0
  %54 = or i64 %3, 0
  %55 = or i64 %3, 0
  %56 = or i64 %3, 0
  %57 = or i64 %3, 0
  %58 = or i64 %3, 0
  %59 = icmp slt i64 %28, 0
  %60 = icmp slt i64 %29, 0
  %61 = icmp slt i64 %30, 0
  %62 = icmp slt i64 %31, 0
  %63 = icmp slt i64 %32, 0
  %64 = icmp slt i64 %33, 0
  %65 = icmp slt i64 %34, 0
  %66 = icmp slt i64 %35, 0
  %67 = icmp slt i64 %36, 0
  %68 = icmp slt i64 %37, 0
  %69 = icmp slt i64 %38, 0
  %70 = icmp slt i64 %39, 0
  %71 = icmp slt i64 %40, 0
  %72 = icmp slt i64 %41, 0
  %73 = icmp slt i64 %42, 0
  %74 = icmp slt i64 %43, 0
  %75 = icmp slt i64 %44, 0
  %76 = icmp slt i64 %45, 0
  %77 = icmp slt i64 %46, 0
  %78 = icmp slt i64 %47, 0
  %79 = icmp slt i64 %48, 0
  %80 = icmp slt i64 %49, 0
  %81 = icmp slt i64 %50, 0
  %82 = icmp slt i64 %51, 0
  %83 = icmp slt i64 %52, 0
  %84 = icmp slt i64 %53, 0
  %85 = icmp slt i64 %54, 0
  %86 = icmp slt i64 %55, 0
  %87 = icmp slt i64 %56, 0
  %88 = icmp slt i64 %57, 0
  %89 = icmp slt i64 %58, 0
  %90 = and i1 false, %59
  %91 = and i1 false, %60
  %92 = and i1 false, %61
  %93 = and i1 false, %62
  %94 = and i1 false, %63
  %95 = and i1 false, %64
  %96 = and i1 false, %65
  %97 = and i1 false, %66
  %98 = and i1 false, %67
  %99 = and i1 false, %68
  %100 = and i1 false, %69
  %101 = and i1 false, %70
  %102 = and i1 false, %71
  %103 = and i1 false, %72
  %104 = and i1 false, %73
  %105 = and i1 false, %74
  %106 = and i1 false, %75
  %107 = and i1 false, %76
  %108 = icmp eq i32 %2, 0
  %109 = and i1 false, %77
  %110 = and i1 false, %78
  %111 = and i1 false, %79
  %112 = and i1 false, %80
  %113 = and i1 false, %81
  %114 = and i1 false, %82
  %115 = and i1 false, %83
  %116 = and i1 false, %84
  %117 = and i1 false, %85
  %118 = and i1 false, %86
  %119 = or i64 %5, %26
  %120 = getelementptr float, ptr addrspace(1) null, i64 %119
  %121 = icmp slt i64 %119, 0
  ret void
}