[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)
Lu Weining via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 22:40:23 PST 2024
SixWeining wrote:
The expectation is at least for this test:
```
define i32 @test(i32 %a, i32 %b) {
%c = udiv i32 %a, %b
ret i32 %c
}
```
### without this feature
```
addi.w $a1, $a1, 0
addi.w $a0, $a0, 0
div.wu $a0, $a0, $a1
ret
```
### with this feature
```
div.wu $a0, $a0, $a1
ret
```
https://github.com/llvm/llvm-project/pull/116764
More information about the cfe-commits
mailing list