[PATCH] D108091: [AggressiveInstCombine] Add shift left instruction to `TruncInstCombine` DAG

Anton Afanasyev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 16 00:50:29 PDT 2021


anton-afanasyev marked an inline comment as done.
anton-afanasyev added inline comments.


================
Comment at: llvm/test/Transforms/AggressiveInstCombine/trunc_shifts.ll:4
 
 define i16 @shl_1_commute(i8 %x) {
 ; CHECK-LABEL: @shl_1_commute(
----------------
lebedev.ri wrote:
> Pedantic nitpick: commute means `mul %x, %y   <=>   mul %y, %x`
> Here you want to use `negative_test` in place of `not_commute`, and drop `commute`.
"Commute" here means that `trunc` and `shl` commutes as operators: `trunc ∘ shl = shl ∘ trunc`, i.e. `trunc(shl(*, *)) = shl(trunc(*), trunc(*)))`. But I'm to change it, thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108091/new/

https://reviews.llvm.org/D108091



More information about the llvm-commits mailing list