[all-commits] [llvm/llvm-project] 26ce3e: [InstCombine] Preserve NSW flags for `lshr (mul nu...

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Fri Nov 17 05:50:34 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26ce3e4239150ccc3328c43e4b47264989c07411
      https://github.com/llvm/llvm-project/commit/26ce3e4239150ccc3328c43e4b47264989c07411
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2023-11-17 (Fri, 17 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/shift-logic.ll

  Log Message:
  -----------
  [InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X, (C1 >> C2)` (#72625)

Alive2: https://alive2.llvm.org/ce/z/TU_V9M

This missed optimization is discovered with the help of
https://github.com/AliveToolkit/alive2/pull/962.




More information about the All-commits mailing list