[llvm] Implement foldICmpRemConstant in InstCombineCompares (PR #77410)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 23:24:19 PST 2024


https://github.com/dtcxzyw requested changes to this pull request.

I applied your patch locally. It works for me:
```
> bin/opt -passes=instcombine test.ll -S
; ModuleID = 'test.ll'
source_filename = "test.ll"

define i1 @src(i8 noundef %0, i8 noundef %1) {
  %3 = mul i8 %0, 3
  %4 = urem i8 %3, %1
  %5 = icmp eq i8 %4, 0
  ret i1 %5
}
```


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


More information about the llvm-commits mailing list