[PATCH] D94934: [llvm] Prevent infinite loop in InstCombine of select statements

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 14:53:28 PST 2021


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:1129
+    };
+    if (IsConstant(CmpRHS) && !IsConstant(CmpLHS))
       if (auto *I = dyn_cast<Instruction>(TrueVal))
----------------
llvm patternmatch has m_ImmConstant :) check it


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94934



More information about the llvm-commits mailing list