[all-commits] [llvm/llvm-project] d7f096: [CIR] Upstream TernaryOp (#137184)

Morris Hafner via All-commits all-commits at lists.llvm.org
Wed Apr 30 09:16:13 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7f096e3fe611ae2cc7403c3cf2f88255a47b61d
      https://github.com/llvm/llvm-project/commit/d7f096e3fe611ae2cc7403c3cf2f88255a47b61d
  Author: Morris Hafner <mmha at users.noreply.github.com>
  Date:   2025-04-30 (Wed, 30 Apr 2025)

  Changed paths:
    M clang/include/clang/CIR/Dialect/IR/CIROps.td
    M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
    M clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
    A clang/test/CIR/IR/ternary.cir
    A clang/test/CIR/Lowering/ternary.cir
    A clang/test/CIR/Transforms/ternary.cir

  Log Message:
  -----------
  [CIR] Upstream TernaryOp (#137184)

This patch adds TernaryOp to CIR plus a pass that flattens the operator
in FlattenCFG.

This is the first PR out of (probably) 3 wrt. TernaryOp. I split the
patches up to make reviewing them easier. As such, this PR is only about
adding the CIR operation. The next PR will be about the CodeGen bits
from the C++ conditional operator and the final one will add the
cir-simplify transform for TernaryOp and SelectOp.

---------

Co-authored-by: Morris Hafner <mhafner at nvidia.com>
Co-authored-by: Andy Kaylor <akaylor at nvidia.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list