[PATCH] D154119: Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass
Kyungwoo Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 20:58:19 PDT 2023
kyulee added a comment.
Thanks for fixing this! This seems a good case to cover.
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:802
+ if (auto *MDL = dyn_cast<MetadataAsValue>(L)) {
+ auto *MDR = cast<MetadataAsValue>(R);
+
----------------
Like the below Constant case below, can you run dyn_cast more explicit to ensure they're not null?.
```
auto *MDL = cast<MetadataAsValue>(L);
auto *MDR = cast<MetadataAsValue>(R);
if (MDL && MDR) {
```
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:878
Value *OpR = InstR->getOperand(i);
+
if (int Res = cmpValues(OpL, OpR))
----------------
This space seems unrelated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154119/new/
https://reviews.llvm.org/D154119
More information about the llvm-commits
mailing list