[all-commits] [llvm/llvm-project] 1206a1: [InstCombine] guard against splat-mul corner case

Sanjay Patel via All-commits all-commits at lists.llvm.org
Mon Apr 11 12:53:27 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1206a18d417aa6d9d3d6f9e25cbf0b07ed1409a4
      https://github.com/llvm/llvm-project/commit/1206a18d417aa6d9d3d6f9e25cbf0b07ed1409a4
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-04-11 (Mon, 11 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/lshr.ll

  Log Message:
  -----------
  [InstCombine] guard against splat-mul corner case

The test is already simplified, and I'm not sure how
to write a test to exercise the new clause. But it
protects the 2-bit pattern from miscompiling as noted
in D123453.

https://alive2.llvm.org/ce/z/QPyVfv
(If we managed to fall into the mul transform, it
would wrongly create a zero on this pattern.)




More information about the All-commits mailing list