[llvm] [InstCombine] Fold negation of unsigned div of non-negatives (PR #84951)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 02:26:24 PDT 2024


================
@@ -2626,3 +2626,141 @@ define i8 @sub_of_adds_2xc(i8 %x, i8 %y) {
   %r = sub i8 %xc, %yc
   ret i8 %r
 }
+
+define i8 @test_neg_of_udiv_of_nonnegs(i8 %a) {
----------------
nikic wrote:

```suggestion
define i8 @test_neg_of_udiv_of_nonnegs_nuw(i8 %a) {
```
Was very confused by this test until I realized this... TBH I think it can be omitted entirely, as it doesn't really have any relation to this fold.

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


More information about the llvm-commits mailing list