[all-commits] [llvm/llvm-project] 353f97: [InstCombine] Optimize selects feeding into BinOp ...

Tejas Joshi via All-commits all-commits at lists.llvm.org
Tue Sep 22 11:58:11 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 353f9778f5d9e8835bfa2357ac3f4ecd7e67c778
      https://github.com/llvm/llvm-project/commit/353f9778f5d9e8835bfa2357ac3f4ecd7e67c778
  Author: Tejas Joshi <tejassanjayj at nvidia.com>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/logical-select-inseltpoison.ll
    M llvm/test/Transforms/InstCombine/logical-select.ll
    A llvm/test/Transforms/InstCombine/selects-feeding-binop.ll
    M llvm/test/Transforms/InstCombine/vec_sext.ll

  Log Message:
  -----------
  [InstCombine] Optimize selects feeding into BinOp (#224478)

Transform:
`(A ? B : C) op (D ? E : F)`

into:
`A ? (B op (D ? E : F)) : (C op (D ? E : F))`

only if D can be implied by A

This allows for more parts of the expression to be predicated, and
allows more CSE and reuse of nodes calculated as part of an exclusive
sum algorithm.

https://alive2.llvm.org/ce/z/Dawj5u



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