[all-commits] [llvm/llvm-project] b32f5d: [InstSimplify] Regenerate test checks (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Mar 21 09:50:23 PDT 2021


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

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

  Log Message:
  -----------
  [InstSimplify] Regenerate test checks (NFC)


  Commit: 59dbf4d516b19dbe08d378a620b72749513611e5
      https://github.com/llvm/llvm-project/commit/59dbf4d516b19dbe08d378a620b72749513611e5
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-21 (Sun, 21 Mar 2021)

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

  Log Message:
  -----------
  [InstSimplify] Add load of undef aggregate test (NFC)

To make sure this doesn't crash the following commit.


  Commit: 9f864d202558b4206adc26789aff8a204ebbe0b2
      https://github.com/llvm/llvm-project/commit/9f864d202558b4206adc26789aff8a204ebbe0b2
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-21 (Sun, 21 Mar 2021)

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

  Log Message:
  -----------
  Reapply [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).

Adjust the type check to consider vectors as well. The previous
version of the patch dropped the type check entirely, but it
turns out that getAggregateElement() does require the constant
to be an aggregate in some edge cases: For Poison/Undef the
getNumElements() API is called, without checking in advance that
we're dealing with an aggregate. Possibly the implementation should
avoid doing that, but for now I'm adding an assert so the next
person doesn't fall into this trap.


Compare: https://github.com/llvm/llvm-project/compare/ece1403acada...9f864d202558


More information about the All-commits mailing list