[all-commits] [llvm/llvm-project] 164058: [InstCombine] replace undef elements in vector con...

RotateRight via All-commits all-commits at lists.llvm.org
Fri Jan 3 06:17:03 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 164058274364670c8b59055b4689ae7e1720268e
      https://github.com/llvm/llvm-project/commit/164058274364670c8b59055b4689ae7e1720268e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-01-03 (Fri, 03 Jan 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-sgt-to-icmp-sgt.ll
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-slt-to-icmp-sgt.ll
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ugt-to-icmp-ugt.ll
    M llvm/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ult-to-icmp-ugt.ll

  Log Message:
  -----------
  [InstCombine] replace undef elements in vector constant when doing icmp folds (PR44383)

As shown in P44383:
https://bugs.llvm.org/show_bug.cgi?id=44383
...we can't safely propagate a vector constant through this icmp fold
if that vector constant contains undefined elements.

We know that each defined element of the constant is safe though, so
find the first of those and replicate it into the formerly undef lanes.

Differential Revision: https://reviews.llvm.org/D72101




More information about the All-commits mailing list