[all-commits] [llvm/llvm-project] d399f8: [VectorCombine] make load transform poison-safe

RotateRight via All-commits all-commits at lists.llvm.org
Mon Dec 14 14:42:21 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d399f870b5a94b9dcc1817ed69fec88c325bb817
      https://github.com/llvm/llvm-project/commit/d399f870b5a94b9dcc1817ed69fec88c325bb817
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-12-14 (Mon, 14 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
    M llvm/test/Transforms/VectorCombine/X86/load.ll

  Log Message:
  -----------
  [VectorCombine] make load transform poison-safe

As noted in D93229, the transform from scalar load to vector load
potentially leaks poison from the extra vector elements that are
being loaded.

We could use freeze here (and x86 codegen at least appears to be
the same either way), but we already have a shuffle in this logic
to optionally change the vector size, so let's allow that
instruction to serve both purposes.

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




More information about the All-commits mailing list