[all-commits] [llvm/llvm-project] edf700: [ConstantFold] Handle vectors in ConstantFoldLoadT...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Mar 6 03:18:52 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: edf7004851519464f86b0f641da4d6c9506decb1
      https://github.com/llvm/llvm-project/commit/edf7004851519464f86b0f641da4d6c9506decb1
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-06 (Sat, 06 Mar 2021)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/test/Transforms/GVN/non-integral-pointers-inseltpoison.ll
    M llvm/test/Transforms/GVN/non-integral-pointers.ll

  Log Message:
  -----------
  [ConstantFold] Handle vectors in ConstantFoldLoadThroughBitcast()

There seems to be an impedance mismatch between what the type
system considers an aggregate (structs and arrays) and what
constants consider an aggregate (structs, arrays and vectors).

Rather than adjusting the type check, simply drop it entirely,
as getAggregateElement() is well-defined for non-aggregates: It
simply returns null in that case.




More information about the All-commits mailing list