[llvm-dev] amdgcn target machine creation assertion FuseFPOpsView RegisterCodeGenFlags

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 29 10:43:39 PDT 2020


Creating the target machine with target 'amdgcn' hits the following 
assertion:

llvm-project/llvm/lib/CodeGen/CommandFlags.cpp:65: 
llvm::FPOpFusion::FPOpFusionMode llvm::codegen::getFuseFPOps(): 
Assertion `FuseFPOpsView && "RegisterCodeGenFlags not created."' failed.

Here the code that runs into the assertion:

   llvm::Triple TheTriple;
   TheTriple.setArch (llvm::Triple::ArchType::amdgcn);
   TheTriple.setVendor (llvm::Triple::VendorType::AMD);
   TheTriple.setOS (llvm::Triple::OSType::AMDHSA);

   std::string Error;
   const llvm::Target *TheTarget = llvm::TargetRegistry::lookupTarget( 
TheTriple.str() , Error );

   llvm::TargetOptions Options = 
llvm::codegen::InitTargetOptionsFromCodeGenFlags();

   std::string CPUStr("gfx906");
   std::string FeaturesStr;

   std::unique_ptr<llvm::TargetMachine> 
TargetMachine(TheTarget->createTargetMachine(
                                             TheTriple.getTriple(),
                                             CPUStr,
                                             FeaturesStr,
                                             Options,
                                             llvm::Optional< 
llvm::Reloc::Model >() ));


Anyone sees what's missing?


This is using the llvm from RadeonOpenCompute/llvm-project and I am not 
sure what llvm version that corresponds to.



Thanks,

Frank






More information about the llvm-dev mailing list