[clang] [llvm] [LoongArch] Support LA V1.1 feature that div.w[u] and mod.w[u] instructions with inputs not signed-extended. (PR #116764)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 22:43:25 PST 2024
tangaac wrote:
the original test is from gcc
```cpp
int divw(long a, long b) {
return (int)a / (int)b;
}
unsigned int divwu(long a, long b) {
return (unsigned int)a / (unsigned int)b;
}
int modw(long a, long b) {
return (int)a % (int)b;
}
unsigned int modwu(long a, long b) {
return (unsigned int)a % (unsigned int)b;
}
```
https://github.com/llvm/llvm-project/pull/116764
More information about the cfe-commits
mailing list