[llvm] [SCEV] Fix BinomialCoefficient Iteration to fit in W bits (PR #88010)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 13:36:58 PDT 2024


================
@@ -0,0 +1,36 @@
+; RUN: opt -S -passes='print<scalar-evolution>,indvars' -verify-scev < %s | FileCheck %s
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
+target triple = "x86_64-unknown-linux-gnu"
+
+; print<scalar-evolution> is used to compute SCEVs for all values in the
+; function.
----------------
efriedma-quic wrote:

I was hoping to actually check the printed result of the computation in question, something like:

```
; CHECK: (zext i1 {false,+,false,+,false,+,false,+,true}<%bb1> to i32) U: [0,2) S: [0,2)          Exits: 0
```

Also, the indvars run shouldn't be necessary.

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


More information about the llvm-commits mailing list