[all-commits] [llvm/llvm-project] da9c93: [InstSimplify] fold select of vector constants tha...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Jan 20 05:48:38 PST 2020


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

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/select.ll

  Log Message:
  -----------
  [InstSimplify] fold select of vector constants that include undef elements

As mentioned in D72643, we'd like to be able to assert that any select
of equivalent constants has been removed before we're deep into InstCombine.

But there's a loophole in that assertion for vectors with undef elements
that don't match exactly.

This patch should close that gap. If we have undefs, we can't safely
propagate those unless both constants elements for that lane are undef.

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




More information about the All-commits mailing list