[all-commits] [llvm/llvm-project] 522eeb: [InstCombine] Sanitize undef vector constant to 1 ...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Tue Aug 18 03:26:55 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 522eeb66edfb0d6c4656d3f7a3f635544def30db
      https://github.com/llvm/llvm-project/commit/522eeb66edfb0d6c4656d3f7a3f635544def30db
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-08-18 (Tue, 18 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/getelementptr.ll

  Log Message:
  -----------
  [InstCombine] Sanitize undef vector constant to 1 in  X*(2^C) with X << C (PR47133)

While x*undef is undef, shift-by-undef is poison,
which we must avoid introducing.

Also log2(iN undef) is *NOT* iN undef, because log2(iN undef) u< N.

See https://bugs.llvm.org/show_bug.cgi?id=47133

(cherry picked from commit 12d93a27e7b78d58dd00817cb737f273d2dba8ae)




More information about the All-commits mailing list