[llvm-bugs] [Bug 32414] New: Regression between r298618 and r298625

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 24 15:01:13 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32414

            Bug ID: 32414
           Summary: Regression between r298618 and r298625
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: vvasilev at cern.ch
                CC: llvm-bugs at lists.llvm.org

Created attachment 18167
  --> https://bugs.llvm.org/attachment.cgi?id=18167&action=edit
Full repro

A reduced example:

cat importE.c
int a, c, e, *b, d;
void fn1() {
  int **f = 0;
  b = f + a;
  for (; e; e++, d += c)
    f[e] = b + d;
}


clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free
-main-file-name import.c -mrelocation-model pic -pic-level 2 -mthread-model
posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -target-feature +mmx -momit-leaf-frame-pointer
-dwarf-column-info -O3 -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o import.o -x c
importE.c
importE.c:4:5: warning: incompatible pointer types assigning to 'int *' from
'int **'; dereference with * [-Wincompatible-pointer-types]
  b = f + a;
    ^ ~~~~~
      *(   )
Assertion failed: (isa<IntegerType>(Val->getType()) && "Can only descale
integers!"), function Descale, file
/Users/vvassilev/workspace/llvm-git/src/lib/Transforms/InstCombine/InstructionCombining.cpp,
line 1054.
0  clang                    0x0000000106e1953c
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 60
1  clang                    0x0000000106e19ab9
PrintStackTraceSignalHandler(void*) + 25
2  clang                    0x0000000106e15839 llvm::sys::RunSignalHandlers() +
425
3  clang                    0x0000000106e19f32 SignalHandler(int) + 354
4  libsystem_platform.dylib 0x00007fff8c32c52a _sigtramp + 26
5  libsystem_platform.dylib 0x00007fff6ad215c8 _sigtramp + 3734982840
6  libsystem_c.dylib        0x00007fff96d326df abort + 129
7  libsystem_c.dylib        0x00007fff96cf9dd8 basename + 0
8  clang                    0x00000001065e6c0f
llvm::InstCombiner::Descale(llvm::Value*, llvm::APInt, bool&) + 175
9  clang                    0x00000001065eb506
llvm::InstCombiner::visitGetElementPtrInst(llvm::GetElementPtrInst&) + 8694
10 clang                    0x00000001065fff28
llvm::InstVisitor<llvm::InstCombiner,
llvm::Instruction*>::visitGetElementPtr(llvm::GetElementPtrInst&) + 40
11 clang                    0x00000001065f3b38
llvm::InstVisitor<llvm::InstCombiner,
llvm::Instruction*>::visit(llvm::Instruction&) + 984
12 clang                    0x00000001065f30ed llvm::InstCombiner::run() + 2701
13 clang                    0x00000001065f45e6
combineInstructionsOverFunction(llvm::Function&, llvm::InstCombineWorklist&,
llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&,
llvm::DominatorTree&, bool, llvm::LoopInfo*) + 902
14 clang                    0x00000001065f4857
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&) + 295
15 clang                    0x0000000106351aef
llvm::FPPassManager::runOnFunction(llvm::Function&) + 399
16 clang                    0x0000000106351ff5
llvm::FPPassManager::runOnModule(llvm::Module&) + 117
17 clang                    0x0000000106352cdf (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&) + 1967
18 clang                    0x00000001063522b6
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 342
19 clang                    0x0000000106353931
llvm::legacy::PassManager::run(llvm::Module&) + 33
20 clang                    0x000000010721df9f (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 4767
21 clang                    0x0000000107219f09
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions
const&, clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*,
clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream,
std::__1::default_delete<llvm::raw_pwrite_stream> >) + 4457
22 clang                    0x000000010758c53c
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 4316
23 clang                    0x00000001091c9e06 clang::ParseAST(clang::Sema&,
bool, bool) + 1238
24 clang                    0x0000000107c6caf5
clang::ASTFrontendAction::ExecuteAction() + 485
25 clang                    0x000000010758ab06
clang::CodeGenAction::ExecuteAction() + 5494
26 clang                    0x0000000107c6bb10 clang::FrontendAction::Execute()
+ 112
27 clang                    0x0000000107b96fca
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 2250
28 clang                    0x0000000107d093ce
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 5822
29 clang                    0x00000001054355b4 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 4900
30 clang                    0x000000010542522e
ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) + 622
31 clang                    0x000000010542249c main + 4460
32 libdyld.dylib            0x00007fff8a0995ad start + 1
33 libdyld.dylib            0x0000000000000026 start + 1979083386
Stack dump:
0.      Program arguments: /Users/vvassilev/workspace/llvm-git/obj/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
import.c -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-target-feature +mmx -momit-leaf-frame-pointer -dwarf-column-info -O3
-ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o import.o -x c
importE.c 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 'importE.c'.
4.      Running pass 'Combine redundant instructions' on function '@fn1'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170324/fcc0d05c/attachment-0001.html>


More information about the llvm-bugs mailing list