[llvm] [X86] Lower scalar integer div/rem to FP division (PR #216589)

Ankit Kumar Tiwari via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 22 06:39:57 PDT 2026


ankit-cybertron wrote:

Hey @Andarwinux, sorry for the delay getting back - was looking into why the .loc lines collapsed before proposing anything.

This test entry block used to have two instructions (a movl to stage %edi into %edx for idivl, then the add), so it got two .loc lines. With srem now using FP division, that movl is gone, so both .loc land on the single add instruction instead.

I think we should update that to one line now instead of two.
```cpp
; CHECK-LABEL: foo:
; CHECK:        .loc    0 2 0 prologue_end
; CHECK-NEXT:   addl    %esi, %edi
; CHECK-NEXT:   je      .LBB0_4
; CHECK-LABEL: # %bb.1:
```
Shall we modify that?

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


More information about the llvm-commits mailing list