[PATCH] D145969: [GVNHoist] add cast to unbreak windows build

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 11:23:13 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb7a33893f598: [GVNHoist] add cast to unbreak windows build (authored by nickdesaulniers).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145969/new/

https://reviews.llvm.org/D145969

Files:
  llvm/lib/Transforms/Scalar/GVNHoist.cpp


Index: llvm/lib/Transforms/Scalar/GVNHoist.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -816,7 +816,7 @@
     // If the Terminator is some kind of "exotic terminator" that produces a
     // value (such as InvokeInst, CallBrInst, or CatchSwitchInst) which the CHI
     // uses, it is not safe to hoist the use above the def.
-    if (!T->use_empty() && is_contained(Insn->operands(), T))
+    if (!T->use_empty() && is_contained(Insn->operands(), cast<const Value>(T)))
       continue;
     if (K == InsKind::Scalar) {
       if (safeToHoistScalar(BB, Insn->getParent(), NumBBsOnAllPaths))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145969.504769.patch
Type: text/x-patch
Size: 709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230313/44feadae/attachment.bin>


More information about the llvm-commits mailing list