[llvm] [LoongArch] Eliminate the redundant sign extension of division (PR #107971)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 21:32:43 PDT 2024
================
@@ -637,6 +637,19 @@ static bool isSignExtendedW(Register SrcReg, const LoongArchSubtarget &ST,
break;
}
return false;
+ // If all incoming values are sign-extended and all users only use
+ // the lower 32 bits, then convert them to W versions.
+ case LoongArch::DIV_D: {
----------------
dtcxzyw wrote:
Does it also hold for `MOD_D`?
https://github.com/llvm/llvm-project/pull/107971
More information about the llvm-commits
mailing list