[llvm] [CodeGen] Remove redundant checks (PR #99524)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 12:05:04 PDT 2024


topperc wrote:

> > define <4 x i32> @foo(<4 x i32> %x) {
> 
> I actually added this check to avoid unforeseen bugs and turns out that was bad on my part. But yeah I will add the test now.

What check did you add? The original code in TargetLowering was written by me. https://reviews.llvm.org/D140750 I specifically didn't do vectors at the time because I hadn't thought through the math as I wrote

```
Wasn't sure if we need to apply the clip by divisor leading zeros uniformly across the whole vector when there are different divisors which would require another loop over the divisors. Or if we could treat each element individually and apply a clip inside BuildUDIVPattern.
```

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


More information about the llvm-commits mailing list