huangcm
2025-02-24 69ed55dec4b2116a19e4cca4393cbc014fce5fb2
1
2
3
4
5
6
7
8
; RUN: opt < %s -instcombine -S | grep srem
 
define i64 @foo(i64 %x1, i64 %y2) {
   %r = sdiv i64 %x1, %y2
   %r7 = mul i64 %r, %y2
   %r8 = sub i64 %x1, %r7
   ret i64 %r8
}