[PATCH] D101201: Preserve TBAA metadata on masked intrinsics in auto-upgrade

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 13:56:00 PDT 2021


kparzysz created this revision.
kparzysz added reviewers: jdoerfert, fhahn, dblaikie, craig.topper.
Herald added subscribers: dexonsmith, kosarev, hiraditya.
kparzysz requested review of this revision.
Herald added a project: LLVM.

When auto-upgrade was replacing a call to a masked intrinsic, it would not copy the TBAA metadata from the original call.

If an intrinsic had TBAA metadata, but did not need any updates, the metadata would stay, but if an update was needed, the TBAA would end up being removed. A similar effect could be observed with masked_expandload and masked_compressstore, which at the moment are not handled by auto-upgrade: the TBAA metadata remained untouched.

There are likely other places where metadata (TBAA or other) is not preserved on masked intrinsics, those will be fixed separately.  It seems like there hasn't been any expectation of having TBAA information on intrinsics, but having them there can definitely be helpful (we create them in a project that uses LLVM as backend, and they do help with alias analysis).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101201

Files:
  llvm/lib/IR/AutoUpgrade.cpp
  llvm/test/Bitcode/upgrade-masked-keep-tbaa.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101201.340154.patch
Type: text/x-patch
Size: 4503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210423/34c0ad33/attachment.bin>


More information about the llvm-commits mailing list