[PATCH] D13378: [SCEV] Recognize simple br-phi patterns

Diego Novillo via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 10:37:13 PDT 2015


dnovillo added a subscriber: dnovillo.
dnovillo added a comment.

Sanjoy,

This commit is causing an internal compiler error with the following code:

int x0, x1, x2;
double *x3;
int fsolv() {

  int x4, x5 = x4 = 0;
  for (; x4 < x2; ++x4) {
    x0 = 0;
    for (; x0 < x4; ++x0)
      x1 = x3[x5++];
  }
  return 0;

}

Is this something you recognize?  If not, do you mind if I revert your
commit while you work on the test case?

Thanks.  Diego.

$ clang -c -O2 a.c
clang-3.8:
/usr/local/google/home/dnovillo/llvm/llvm/lib/Analysis/LazyValueInfo.cpp:632:
bool (anonymous namespace)::LazyValueInfoCache
::solveBlockValueNonLocal((anonymous namespace)::LVILatticeVal &,
llvm::Value *, llvm::BasicBlock *): Assertion `isa<Argument>(Val) &&
"Unknown live-in to the entry block"' failed.
0  libLLVMSupport.so.3.8       0x00007f484d2fafde
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 46
1  libLLVMSupport.so.3.8       0x00007f484d2fc119
2  libLLVMSupport.so.3.8       0x00007f484d2fab53
llvm::sys::RunSignalHandlers() + 131
3  libLLVMSupport.so.3.8       0x00007f484d2fc35b
4  libc.so.6                   0x00007f484a447d40
5  libc.so.6                   0x00007f484a447cc9 gsignal + 57
6  libc.so.6                   0x00007f484a44b0d8 abort + 328
7  libc.so.6                   0x00007f484a440b86
8  libc.so.6                   0x00007f484a440c32
9  libLLVMAnalysis.so.3.8      0x00007f48504ba546
10 libLLVMAnalysis.so.3.8      0x00007f48504b9dd6
11 libLLVMAnalysis.so.3.8      0x00007f48504b97b2
12 libLLVMAnalysis.so.3.8      0x00007f48504b776e
13 libLLVMAnalysis.so.3.8      0x00007f48504b7541
llvm::LazyValueInfo::getConstantOnEdge(llvm::Value*, llvm::BasicBlock*,
llvm::BasicBl
ock*, llvm::Instruction*) + 129
14 libLLVMScalarOpts.so.3.8    0x00007f484d60a6ea
15 libLLVMScalarOpts.so.3.8    0x00007f484d60a317
16 libLLVMCore.so.3.8          0x00007f484f4281ff
llvm::FPPassManager::runOnFunction(llvm::Function&) + 399
17 libLLVMAnalysis.so.3.8      0x00007f48503f1611
18 libLLVMAnalysis.so.3.8      0x00007f48503f107d
19 libLLVMAnalysis.so.3.8      0x00007f48503f0928
20 libLLVMCore.so.3.8          0x00007f484f428caa
21 libLLVMCore.so.3.8          0x00007f484f4287d6
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 342
22 libLLVMCore.so.3.8          0x00007f484f4291c1
llvm::legacy::PassManager::run(llvm::Module&) + 33
23 libclangCodeGen.so.3.8      0x00007f484bbb6dd5
24 libclangCodeGen.so.3.8      0x00007f484bbb6502
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*) + 162
25 libclangCodeGen.so.3.8      0x00007f484be89a39
26 libclangParse.so.3.8        0x00007f48463905b1
clang::ParseAST(clang::Sema&, bool, bool) + 817
27 libclangFrontend.so.3.8     0x00007f484b402d10
clang::ASTFrontendAction::ExecuteAction() + 320
28 libclangCodeGen.so.3.8      0x00007f484be875f4
clang::CodeGenAction::ExecuteAction() + 2100
29 libclangFrontend.so.3.8     0x00007f484b4027f0
clang::FrontendAction::Execute() + 112
30 libclangFrontend.so.3.8     0x00007f484b39f402
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 978
31 libclangFrontendTool.so.3.8 0x00007f484affa764
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1172
32 clang-3.8                   0x0000000000423f08
cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 920
33 clang-3.8                   0x0000000000417839
34 clang-3.8                   0x0000000000416715 main + 2277
35 libc.so.6                   0x00007f484a432ec5 __libc_start_main + 245
36 clang-3.8                   0x0000000000415ce4
Stack dump:

1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'a.c'.
4. Running pass 'Value Propagation' on function '@fsolv'


Repository:
  rL LLVM

http://reviews.llvm.org/D13378





More information about the llvm-commits mailing list