You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CIR] Generate SelectOp instead of TernaryOp for if cheap enough to evaluate unconditionally (llvm#1642)
This came up during the review of
llvm/llvm-project#138156
During codegen we check whether the LHS and RHS of the conditional
operator are cheap enough to evaluate uncondionally. Unlike classic
codegen we still emit `TernaryOp` instead of `SelectOp` and defer that
optimization to cir-simplify.
This patch changes codegen to directly emit `SelectOp` for `cond ?
constant : constant` expressions.
0 commit comments