aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopVersioning.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2023-04-14 11:48:54 +0200
committerNikita Popov <npopov@redhat.com>2023-04-17 12:52:31 +0200
commit8cdca966902a5af9c28b5f6fb8602b22a07808a1 (patch)
treef9522ae38b152fb366bf6288c8e9a23ab28b269f /llvm/lib/Transforms/Utils/LoopVersioning.cpp
parent69ee6533131d030bc724193bfc1b91fcc99a81d2 (diff)
downloadllvm-8cdca966902a5af9c28b5f6fb8602b22a07808a1.zip
llvm-8cdca966902a5af9c28b5f6fb8602b22a07808a1.tar.gz
llvm-8cdca966902a5af9c28b5f6fb8602b22a07808a1.tar.bz2
[GVN] Adjust metadata for coerced load CSE
When reusing a load in a way that requires coercion (i.e. casts or bit extraction) we currently fail to adjust metadata. Unfortunately, none of our existing tooling for this is really suitable, because combineMetadataForCSE() expects both loads to have the same type. In this case we may work on loads of different types and possibly offset memory location. As such, what this patch does is to simply drop all metadata, with the following exceptions: * Metadata for which violation is known to always cause UB. * If the load is !noundef, keep all metadata, as this will turn poison-generating metadata into UB as well. This fixes the miscompile that was exposed by D146629. Differential Revision: https://reviews.llvm.org/D148129
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopVersioning.cpp')
0 files changed, 0 insertions, 0 deletions