[llvm] [IRCE] Skip icmp ptr in `InductiveRangeCheck::parseRangeCheckICmp` (PR #89967)

Danila Malyutin via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 12:33:21 PDT 2024


================
@@ -279,6 +279,10 @@ bool InductiveRangeCheck::parseRangeCheckICmp(Loop *L, ICmpInst *ICI,
   Value *LHS = ICI->getOperand(0);
   Value *RHS = ICI->getOperand(1);
 
+  // ICmp with pointers are unsupported.
+  if (LHS->getType()->isPtrOrPtrVectorTy())
----------------
danilaml wrote:

I think the actual current restriction is more like,
```cpp
if (!LHS->getType()->isIntegerTy())
  return false;
```
but this also works.

https://github.com/llvm/llvm-project/pull/89967


More information about the llvm-commits mailing list