[all-commits] [llvm/llvm-project] ce5b88: [InstCombine] Handle constant arms in `select` of ...

Antonio Frighetto via All-commits all-commits at lists.llvm.org
Sat Sep 16 03:23:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce5b88bf10ac5841ca0691ef3f2d87e62748dcd7
      https://github.com/llvm/llvm-project/commit/ce5b88bf10ac5841ca0691ef3f2d87e62748dcd7
  Author: Antonio Frighetto <me at antoniofrighetto.com>
  Date:   2023-09-16 (Sat, 16 Sep 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select-divrem.ll

  Log Message:
  -----------
  [InstCombine] Handle constant arms in `select` of `srem` fold

Extend folding for `2^n` euclidean division remainder operations
on signed integers by handling the specific instance in which one
`select` arm has already been replaced by 1.

Reported-By: HypheX

Fixes: https://github.com/llvm/llvm-project/issues/66417.




More information about the All-commits mailing list