[PATCH] D148306: remove useless condition in assert in SelectionDAG.cpp

Wang, Xin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 01:05:07 PDT 2023


XinWang10 updated this revision to Diff 514128.
XinWang10 added a comment.

- update condition


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148306

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -7952,7 +7952,8 @@
   assert((Opcode == ISD::INTRINSIC_VOID ||
           Opcode == ISD::INTRINSIC_W_CHAIN ||
           Opcode == ISD::PREFETCH ||
-           (int)Opcode >= ISD::FIRST_TARGET_MEMORY_OPCODE) &&
+          (Opcode <= std::numeric_limits<unsigned>::max() &&
+           (int)Opcode >= ISD::FIRST_TARGET_MEMORY_OPCODE)) &&
          "Opcode is not a memory-accessing opcode!");
 
   // Memoize the node unless it returns a flag.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148306.514128.patch
Type: text/x-patch
Size: 670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/8435ac83/attachment.bin>


More information about the llvm-commits mailing list