[llvm-bugs] [Bug 39511] New: A/F: (!From->hasAnyUseOfValue(i) || From->getValueType(i) == To->getValueType(i)) && "Cannot use this version of ReplaceAllUsesWith!" after r345602

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 31 20:36:23 PDT 2018


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

            Bug ID: 39511
           Summary: A/F: (!From->hasAnyUseOfValue(i) ||
                    From->getValueType(i) == To->getValueType(i)) &&
                    "Cannot use this version of ReplaceAllUsesWith!" after
                    r345602
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: douglas_yung at playstation.sony.com
                CC: llvm-bugs at lists.llvm.org

One of our internal code bases hit an assertion failure that started occurring
after r345602. Oddly, it only seems to reproduce on a Windows hosted compiler.

Here is the reduced reproducer:

/* repro.cpp */
typedef float a __attribute__((__vector_size__(16)));
a b, c;
extern "C" void *memcpy(void *, void *, long);
int af;
void j() {
  a k = b + c;
  float *l((float *)&k);
  memcpy(&af, l, 12);
}

If you compile it on Windows with optimizations using a compiler that includes
r345602, it will hit the following assertion failure:

Command: clang -c -O2 repro.cpp

Output:
Assertion failed: (!From->hasAnyUseOfValue(i) || From->getValueType(i) ==
To->getValueType(i)) && "Cannot use this version of ReplaceAllUsesWith!", file
C:\src\upstream\llvm_clean\lib\CodeGen\SelectionDAG\SelectionDAG.cpp, line 7836
LLVMSymbolizer: error reading file: 'ucrtbase.pdb': no such file or directory
LLVMSymbolizer: error reading file: 'kernel32.pdb': no such file or directory
LLVMSymbolizer: error reading file: 'ntdll.pdb': no such file or directory
#0 0x00007ff70d1188d5 HandleAbort
c:\src\upstream\llvm_clean\lib\support\windows\signals.inc:409:0
#1 0x00007fff3cbdab2f (C:\WINDOWS\System32\ucrtbase.dll+0x6ab2f)
#2 0x00007fff3cbdb821 (C:\WINDOWS\System32\ucrtbase.dll+0x6b821)
#3 0x00007fff3cbdd58a (C:\WINDOWS\System32\ucrtbase.dll+0x6d58a)
#4 0x00007fff3cbdd485 (C:\WINDOWS\System32\ucrtbase.dll+0x6d485)
#5 0x00007fff3cbdd7bf (C:\WINDOWS\System32\ucrtbase.dll+0x6d7bf)
#6 0x00007ff70dbc8d8a llvm::SelectionDAG::ReplaceAllUsesWith(class llvm::SDNode
*,class llvm::SDNode *)
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\selectiondag.cpp:7833:0
#7 0x00007ff70dcd9efd `anonymous namespace'::DAGCombiner::Run
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\dagcombiner.cpp:1482:0
#8 0x00007ff70dcc0bc4 llvm::SelectionDAG::Combine(enum llvm::CombineLevel,class
llvm::AAResults *,enum llvm::CodeGenOpt::Level)
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\dagcombiner.cpp:19085:0
#9 0x00007ff70dc753f0 llvm::SelectionDAGISel::CodeGenAndEmitDAG(void)
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\selectiondagisel.cpp:754:0
#10 0x00007ff70dc7e980 llvm::SelectionDAGISel::SelectBasicBlock(class
llvm::ilist_iterator<struct llvm::ilist_detail::node_options<class
llvm::Instruction,1,0,void>,0,1>,class llvm::ilist_iterator<struct
llvm::ilist_detail::node_options<class llvm::Instruction,1,0,void>,0,1>,bool &)
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\selectiondagisel.cpp:669:0
#11 0x00007ff70dc7e0e3 llvm::SelectionDAGISel::SelectAllBasicBlocks(class
llvm::Function const &)
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\selectiondagisel.cpp:1787:0
#12 0x00007ff70dc8b037 llvm::SelectionDAGISel::runOnMachineFunction(class
llvm::MachineFunction &)
c:\src\upstream\llvm_clean\lib\codegen\selectiondag\selectiondagisel.cpp:471:0
#13 0x00007ff70c08c45d `anonymous
namespace'::X86DAGToDAGISel::runOnMachineFunction
c:\src\upstream\llvm_clean\lib\target\x86\x86iseldagtodag.cpp:187:0
#14 0x00007ff70c689ef0 llvm::MachineFunctionPass::runOnFunction(class
llvm::Function &)
c:\src\upstream\llvm_clean\lib\codegen\machinefunctionpass.cpp:74:0
#15 0x00007ff70ca3b0dc llvm::FPPassManager::runOnFunction(class llvm::Function
&) c:\src\upstream\llvm_clean\lib\ir\legacypassmanager.cpp:1644:0
#16 0x00007ff70ca3b3c7 llvm::FPPassManager::runOnModule(class llvm::Module &)
c:\src\upstream\llvm_clean\lib\ir\legacypassmanager.cpp:1678:0
#17 0x00007ff70ca3b64f `anonymous namespace'::MPPassManager::runOnModule
c:\src\upstream\llvm_clean\lib\ir\legacypassmanager.cpp:1744:0
#18 0x00007ff70ca3a867 llvm::legacy::PassManagerImpl::run(class llvm::Module &)
c:\src\upstream\llvm_clean\lib\ir\legacypassmanager.cpp:1858:0
#19 0x00007ff70d486adf `anonymous namespace'::EmitAssemblyHelper::EmitAssembly
c:\src\upstream\llvm_clean\tools\clang\lib\codegen\backendutil.cpp:868:0
#20 0x00007ff70d4888e3 clang::EmitBackendOutput(class clang::DiagnosticsEngine
&,class clang::HeaderSearchOptions const &,class clang::CodeGenOptions const
&,class clang::TargetOptions const &,class clang::LangOptions const &,class
llvm::DataLayout const &,class llvm::Module *,enum clang::BackendAction,class
std::unique_ptr<class llvm::raw_pwrite_stream,struct std::default_delete<class
llvm::raw_pwrite_stream> >)
c:\src\upstream\llvm_clean\tools\clang\lib\codegen\backendutil.cpp:1300:0
#21 0x00007ff70fe1b7fd clang::BackendConsumer::HandleTranslationUnit(class
clang::ASTContext &)
c:\src\upstream\llvm_clean\tools\clang\lib\codegen\codegenaction.cpp:297:0
#22 0x00007ff70e9e0729 clang::ParseAST(class clang::Sema &,bool,bool)
c:\src\upstream\llvm_clean\tools\clang\lib\parse\parseast.cpp:177:0
#23 0x00007ff70da112d1 clang::ASTFrontendAction::ExecuteAction(void)
c:\src\upstream\llvm_clean\tools\clang\lib\frontend\frontendaction.cpp:1019:0
#24 0x00007ff70da110fc clang::FrontendAction::Execute(void)
c:\src\upstream\llvm_clean\tools\clang\lib\frontend\frontendaction.cpp:920:0
#25 0x00007ff70d9c8880 clang::CompilerInstance::ExecuteAction(class
clang::FrontendAction &)
c:\src\upstream\llvm_clean\tools\clang\lib\frontend\compilerinstance.cpp:965:0
#26 0x00007ff70dac3c79 clang::ExecuteCompilerInvocation(class
clang::CompilerInstance *)
c:\src\upstream\llvm_clean\tools\clang\lib\frontendtool\executecompilerinvocation.cpp:258:0
#27 0x00007ff70c051a41 cc1_main(class llvm::ArrayRef<char const *>,char const
*,void *)
c:\src\upstream\llvm_clean\tools\clang\tools\driver\cc1_main.cpp:218:0
#28 0x00007ff70c04b0b8 ExecuteCC1Tool
c:\src\upstream\llvm_clean\tools\clang\tools\driver\driver.cpp:320:0
#29 0x00007ff70c04e4d5 main
c:\src\upstream\llvm_clean\tools\clang\tools\driver\driver.cpp:382:0
#30 0x00007ff70fb06a65 __scrt_common_main_seh
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253:0
#31 0x00007fff3f311fe4 (C:\WINDOWS\System32\KERNEL32.DLL+0x11fe4)
#32 0x00007fff3fb2cb31 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6cb31)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (trunk 345602)
Target: x86_64-scei-ps4
Thread model: posix
InstalledDir: C:\src\upstream\345602-win32-RelWithDebInfo\RelWithDebInfo\bin

-- 
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/20181101/63cf36b7/attachment-0001.html>


More information about the llvm-bugs mailing list