<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 - InstCombine: Failed AA query, Assertion failed: (ArgIdx == 2 && "Invalid argument index")"
   href="https://bugs.llvm.org/show_bug.cgi?id=37948">37948</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>InstCombine: Failed AA query, Assertion failed: (ArgIdx == 2 && "Invalid argument 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>All
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vsk@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As of r335682, llvm asserts when running InstCombine over
test/Transforms/EarlyCSE/invariant.start.ll. Running "./bin/opt -basicaa
-early-cse -instcombine" also asserts in the same way.

$ ./bin/opt -instcombine -S -o -
$(srcs)/test/Transforms/EarlyCSE/invariant.start.ll
Assertion failed: (ArgIdx == 2 && "Invalid argument index"), function
getForArgument, file
/Users/vsk/src/llvm.org-master/llvm/lib/Analysis/MemoryLocation.cpp, line 140.
Stack dump:
0.      Program arguments: ./bin/opt -instcombine -S -o -
/Users/vsk/src/llvm.org-master/llvm//test/Transforms/EarlyCSE/invariant.start.ll
1.      Running pass 'Function Pass Manager' on module
'/Users/vsk/src/llvm.org-master/llvm//test/Transforms/EarlyCSE/invariant.start.ll'.
2.      Running pass 'Combine redundant instructions' on function
'@test_negative_scope'
0  opt                      0x000000010ec26ed8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  opt                      0x000000010ec25e08 llvm::sys::RunSignalHandlers() +
248
2  opt                      0x000000010ec274f2 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff7d14ef5a _sigtramp + 26
4  libsystem_platform.dylib 000000000000000000 _sigtramp + 2196443328
5  libsystem_c.dylib        0x00007fff7ceec1ae abort + 127
6  libsystem_c.dylib        0x00007fff7ceb41ac basename_r + 0
7  opt                      0x000000010df8501e
llvm::MemoryLocation::getForArgument(llvm::ImmutableCallSite, unsigned int,
llvm::TargetLibraryInfo const&) + 1358
8  opt                      0x000000010de28336
llvm::AAResults::getModRefInfo(llvm::ImmutableCallSite, llvm::MemoryLocation
const&) + 454
9  opt                      0x000000010de32795
llvm::AAResults::getModRefInfo(llvm::Instruction const*,
llvm::Optional<llvm::MemoryLocation> const&) + 325
10 opt                      0x000000010df3b922
llvm::FindAvailablePtrLoadStore(llvm::Value*, llvm::Type*, bool,
llvm::BasicBlock*,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, false>&, unsigned int, llvm::AAResults*, bool*, unsigned
int*) + 738
11 opt                      0x000000010df3b62e
llvm::FindAvailableLoadedValue(llvm::LoadInst*, llvm::BasicBlock*,
llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true,
false, void>, false, false>&, unsigned int, llvm::AAResults*, bool*, unsigned
int*) + 110
12 opt                      0x000000010e7aa1b6
llvm::InstCombiner::visitLoadInst(llvm::LoadInst&) + 598
13 opt                      0x000000010e6fc768
llvm::InstVisitor<llvm::InstCombiner,
llvm::Instruction*>::visitLoad(llvm::LoadInst&) + 40
14 opt                      0x000000010e6d3a72
llvm::InstVisitor<llvm::InstCombiner,
llvm::Instruction*>::visit(llvm::Instruction&) + 930
15 opt                      0x000000010e6d2805 llvm::InstCombiner::run() + 2597
16 opt                      0x000000010e6d4979
combineInstructionsOverFunction(llvm::Function&, llvm::InstCombineWorklist&,
llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&,
llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, bool, llvm::LoopInfo*)
+ 1001
17 opt                      0x000000010e6d4ee6
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&) + 342
18 opt                      0x000000010e566790
llvm::FPPassManager::runOnFunction(llvm::Function&) + 608
19 opt                      0x000000010e566a83
llvm::FPPassManager::runOnModule(llvm::Module&) + 67
20 opt                      0x000000010e566fbd
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 941
21 opt                      0x000000010d80ec68 main + 12264
22 libdyld.dylib            0x00007fff7ce40015 start + 1
zsh: abort      ./bin/opt -instcombine -S -o -</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>