[all-commits] [llvm/llvm-project] 2813ac: Update m_Undef to match vectors/aggrs with undefs ...

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Sat Apr 17 19:11:42 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2813acb7d1f70ec1d4a2a1360028950a0bc2ac8f
      https://github.com/llvm/llvm-project/commit/2813acb7d1f70ec1d4a2a1360028950a0bc2ac8f
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-04-18 (Sun, 18 Apr 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/InstructionSimplify.h
    M llvm/include/llvm/IR/PatternMatch.h
    M llvm/test/Transforms/InstSimplify/icmp-constant.ll
    M llvm/unittests/IR/PatternMatch.cpp

  Log Message:
  -----------
  Update m_Undef to match vectors/aggrs with undefs and poisons mixed

This fixes https://reviews.llvm.org/D93990#2666922
by teaching `m_Undef` to match vectors/aggrs with poison elements.

As suggested, fixes in InstCombine files to use the `m_Undef` matcher instead
of `isa<UndefValue>` will be followed.

Reviewed By: lebedev.ri

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


  Commit: 1c10201d9660c1d6f43a7226ca7381bfa255105d
      https://github.com/llvm/llvm-project/commit/1c10201d9660c1d6f43a7226ca7381bfa255105d
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-04-18 (Sun, 18 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
    M llvm/test/Transforms/PhaseOrdering/X86/scalarization.ll
    M llvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll

  Log Message:
  -----------
  Update InstCombine to use undef matcher instead

This is a patch to use m_Undef() matcher instead of isa<UndefValue>().

As suggested in D100122, this update is separately committed.


Compare: https://github.com/llvm/llvm-project/compare/dd68942f1d79...1c10201d9660


More information about the All-commits mailing list