[all-commits] [llvm/llvm-project] 00686a: [ConstantFold] Add additional load from uniform va...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jan 5 03:31:03 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00686ab4afd967fb3c10127a48096d72e4f218b5
      https://github.com/llvm/llvm-project/commit/00686ab4afd967fb3c10127a48096d72e4f218b5
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/test/Transforms/InstSimplify/ConstProp/loads.ll

  Log Message:
  -----------
  [ConstantFold] Add additional load from uniform value tests (NFC)


  Commit: 99c6b12b924f375a80540de721a2bc438ed3cf49
      https://github.com/llvm/llvm-project/commit/99c6b12b924f375a80540de721a2bc438ed3cf49
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/ConstantFolding.h
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    M llvm/test/Transforms/InstSimplify/ConstProp/loads.ll

  Log Message:
  -----------
  [ConstantFolding] Unify handling of load from uniform value

There are a number of places that specially handle loads from a
uniform value where all the bits are the same (zero, one, undef,
poison), because we a) don't care about the load offset in that
case b) it bypasses casts that might not be legal generally but
do work with uniform values.

We had multiple implementations of this, with a different set of
supported values each time. This replaces two usages with a more
complete helper. Other usages will be replaced separately, because
they have larger impact.

This is part of D115924.


Compare: https://github.com/llvm/llvm-project/compare/46e316651f78...99c6b12b924f


More information about the All-commits mailing list