[all-commits] [llvm/llvm-project] 52315f: [clang][OpenMP] Fix target data if/logical express...

David Pagan via All-commits all-commits at lists.llvm.org
Thu Oct 26 13:19:52 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 52315f9b75f1bd02367fbf38096a58d10d3c67d8
      https://github.com/llvm/llvm-project/commit/52315f9b75f1bd02367fbf38096a58d10d3c67d8
  Author: David Pagan <dave.pagan at amd.com>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    A clang/test/OpenMP/target_data_if_logical_codegen.cpp

  Log Message:
  -----------
  [clang][OpenMP] Fix target data if/logical expression assert fail (#70268)

Fixed assertion failure

  Basic Block in function 'main' does not have terminator!
  label %land.end

caused by premature setting of CodeGenIP upon entry to
emitTargetDataCalls, where subsequent evaluation of logical expression
created new basic blocks, leaving CodeGenIP pointing to the wrong basic
block. CodeGenIP is now set near the end of the function, just prior to
generating a comparison of the logical expression result (from the if
clause) which uses CodeGenIP to insert new IR.




More information about the All-commits mailing list