IBM Support

IJ52447: FIX "INVALID BASIC BLOCK ARGUMENT!" ASSERTION IN PHINODE::GETINCOMINGVALUEFORBLOCK

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • When compiling large testcase with -O2 or higher, the compiler
    may produce an assert similar to the following:
    
    $ ibm-clang -c -O3 -m64 -o assert_invalid_basic_block_argument.o
    assert_invalid_basic_block_argument.ll
    
    Assertion failed: Idx >= 0 && "Invalid basic block argument!",
    file  llvm/include/llvm/IR/Instructions.h, line 2905,
    llvm::Value *llvm::PHINode::getIncomingValueForBlock(const
    llvm::BasicBlock *) const()
    PLEASE submit a bug report to [https://ibm.biz/openxlcpp-suppor
    t](https://urldefense.proofpoint.com/v2/url?u=https-3A__ibm.biz
    _openxlcpp-2Dsupport&d=DwMFAg&c=BSDicqBQBDjDI9RkVyTcHQ&r=UoTB0N
    JyahNcSmHLXog12y9J9_TFjXKTjd2MXnBGUiY&m=3WgWAAc-0PUK3dn4xsYEOPX
    SxybK47XYuFFIEg8js3uLn0PJsls8KIcYGkX2CEqw&s=Pyge8dy4CkFip4OyDwy
    xQm1be3wNwFFM9ewgjyStV-Q&e=)and include the crash backtrace, pre
    associated run script.
    Stack dump:
    0.      Program arguments:
    /opt/IBM/openxlC/17.1.2/bin/.ibm-clang.orig -c -O3 -m64 -o
    assert_invalid_basic_block_argument.o
    assert_invalid_basic_block_argument.ll
    1.      Code generation
    2.      Running pass 'Function Pass Manager' on module
    'assert_invalid_basic_block_argument.ll'.
    3.      Running pass 'Canonicalize natural loops' on function
    '@setup_phase'
     Offset 0x000000c4 pthread_kill
     Offset 0x00000048 _p_raise
     Offset 0x0000004c raise
     Offset 0x000000bc abort
     Offset 0x0000027c __assert_c99
     Offset 0x00000110
    llvm::PHINode::getIncomingValueForBlock(llvm::BasicBlock const*)
    const
     Offset 0x00000154 UpdatePHINodes(llvm::BasicBlock*,
    llvm::BasicBlock*, llvm::ArrayRef<llvm::BasicBlock*>,
    llvm::BranchInst*, bool)
     Offset 0x00000530 SplitBlockPredecessorsImpl(llvm::BasicBlock*,
    llvm::ArrayRef<llvm::BasicBlock*>, char const*,
    llvm::DomTreeUpdater*, llvm::DominatorTree*, llvm::LoopInfo*,
    llvm::MemorySSAUpdater*, bool)
     Offset 0x00000030
    llvm::SplitBlockPredecessors(llvm::BasicBlock*,
    llvm::ArrayRef<llvm::BasicBlock*>, char const*,
    llvm::DominatorTree*, llvm::LoopInfo*, llvm::MemorySSAUpdater*,
    bool)
     Offset 0x00000730 llvm::formDedicatedExitBlocks(llvm::Loop*,
    llvm::DominatorTree*, llvm::LoopInfo*, llvm::MemorySSAUpdater*,
    bool)
     Offset 0x00000f88 simplifyOneLoop(llvm::Loop*,
    llvm::SmallVectorImpl<llvm::Loop*>&, llvm::DominatorTree*,
    llvm::LoopInfo*, llvm::ScalarEvolution*, llvm::AssumptionCache*,
    llvm::MemorySSAUpdater*, bool)
     Offset 0x000001f8 llvm::simplifyLoop(llvm::Loop*,
    llvm::DominatorTree*, llvm::LoopInfo*, llvm::ScalarEvolution*,
    llvm::AssumptionCache*, llvm::MemorySSAUpdater*, bool)
     Offset 0x000003c0 (anonymous
    namespace)::LoopSimplify::runOnFunction(llvm::Function&)
     Offset 0x0000032c
    llvm::FPPassManager::runOnFunction(llvm::Function&)
     Offset 0x00000058
    llvm::FPPassManager::runOnModule(llvm::Module&)
     Offset 0x00000988
    llvm::legacy::PassManagerImpl::run(llvm::Module&)
     Offset 0x00000014 llvm::legacy::PassManager::run(llvm::Module&)
    
     Offset 0x000011c4
    clang::EmitBackendOutput(clang::DiagnosticsEngine&,
    clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
    clang::TargetOptions const&, clang::LangOptions const&,
    llvm::StringRef, llvm::Module*, clang::BackendAction,
    llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>,
    std::__1::unique_ptr<llvm::raw_pwrite_stream,
    std::__1::default_delete<llvm::raw_pwrite_stream>>)
     Offset 0x00000a04 clang::CodeGenAction::ExecuteAction()
     Offset 0x000000bc clang::FrontendAction::Execute()
     Offset 0x00000508
    clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
     Offset 0x00000320
    clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
     Offset 0x00000690 cc1_main(llvm::ArrayRef<char const*>, char
    const*, void*)
     Offset 0x000001c4 ExecuteCC1Tool(llvm::SmallVectorImpl<char
    const*>&, llvm::ToolContext const&)
     Offset 0x0000001c int llvm::function_ref<int
    (llvm::SmallVectorImpl<char
    const*>&)>::callback_fn<clang_main(int, char**,
    llvm::ToolContext const&)::$_0>(long, llvm::SmallVectorImpl<char
    const*>&)
     Offset 0x0000003c void llvm::function_ref<void ()>::callback_f
    n<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::o
    ptional<llvm::StringRef>>,std::__1::basic_string<char, std::__1:
    std::__1::allocator<char>>*, bool*) const::$_1>(long)
     Offset 0x000000dc
    llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void
    ()>)
     Offset 0x00000130 clang::driver::CC1Command::Execute(llvm::Arr
    ayRef<std::__1::optional<llvm::StringRef>>,std::__1::basic_strin
    std::__1::allocator<char>>*, bool*) const
     Offset 0x00000470 clang::driver::Compilation::ExecuteCommand(c
    lang::driver::Commandconst&, clang::driver::Command const*&, boo
     Offset 0x000003a8
    clang::driver::Compilation::ExecuteJobs(clang::driver::JobList
    const&, llvm::SmallVectorImpl<std::__1::pair<int,
    clang::driver::Command const*>>&, bool) const
     Offset 0x00000218 clang::driver::Driver::ExecuteCompilation(cl
    ang::driver::Compilation&,llvm::SmallVectorImpl<std::__1::pair<i
    const*>>&)
     Offset 0x00003340 clang_main(int, char**, llvm::ToolContext
    const&)
     Offset 0x00000028 main
     --- End of call chain ---
    .ibm-clang: error: clang frontend command failed with exit code
    134 (use -v to see invocation)
    IBM Open XL C/C++ for AIX 17.1.2 (5725-C72, 5765-J18), version
    17.1.2.10, clang version 17.0.6 (build da7bd4a
    da7bd4afc22e1c0785a242a79f42c4f67ccbae6e)
    Target: powerpc64-ibm-aix7.2.0.0
    Thread model: posix
    InstalledDir: /opt/IBM/openxlC/17.1.2/bin
    .ibm-clang: note: diagnostic msg: Error generating preprocessed
    source(s) - no preprocessable inputs.
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    
    
    Users who compile with -O2 and above and who have large
    programs may be affected by this issue.
    
    
    
    
    
    PROBLEM DESCRIPTION:
    
    
    The incoming values to a certain internal backend function was
    incorrect leading to the assertion.
    

Problem conclusion

  • The incoming values to the internal backend function has been
    fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ52447

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    H12

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2024-09-18

  • Closed date

    2024-09-20

  • Last modified date

    2024-09-20

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ FOR AI

  • Fixed component ID

    5725C7200

Applicable component levels

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"H12","Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Document Information

More support for:
XL C/C++ for AIX

Software version:
H12

Document number:
7169598

Modified date:
20 September 2024