[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:13:04 PDT 2023


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

- update


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 <= (unsigned)std::numeric_limits<int>::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.514131.patch
Type: text/x-patch
Size: 675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/696e9fe6/attachment.bin>


More information about the llvm-commits mailing list