[llvm] [MIPS] Sign-extend subwords when expanding atomic max/min (PR #89246)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 23:55:22 PDT 2024
================
@@ -1118,6 +1118,8 @@ define i16 @test_max_16(ptr nocapture %ptr, i16 signext %val) {
; MIPSEL-NEXT: srav $7, $7, $10
; MIPSEL-NEXT: seh $2, $2
; MIPSEL-NEXT: seh $7, $7
+; MIPSEL-NEXT: sllv $2, $2, $10
----------------
wzssyqa wrote:
I am sorry that I don't understand it well.
`seh` does be sign-extended. The result of `seh` is good enough for `slt`.
Why do we need to extend them to 32bit value?
https://github.com/llvm/llvm-project/pull/89246
More information about the llvm-commits
mailing list