[llvm] [MIPS] Sign-extend subwords when expanding atomic max/min (PR #89246)

Jovan Dmitrović via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 03:37:11 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
----------------
jdmitrovic-syrmia wrote:

> Another question, does `atomicrmw` need to support unaligned access?

I don't believe so. According to the documentation, `alignment` field is always present for in-memory IR and default alignment is provided when the alignment field isn't present.

However, I'm unsure how your questions tie in with this PR.



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


More information about the llvm-commits mailing list