[llvm-branch-commits] [llvm] release/18.x: [Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072) (PR #84566)
Craig Topper via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 19 20:07:44 PDT 2024
================
@@ -2001,8 +2225,6 @@ define i16 @test_umax_16(ptr nocapture %ptr, i16 signext %val) {
; MIPSELR6-NEXT: $BB6_1: # %entry
; MIPSELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSELR6-NEXT: ll $2, 0($6)
-; MIPSELR6-NEXT: and $2, $2, $8
----------------
topperc wrote:
@yingopq I'm not really a Mips expert so I'm not sure. But my understanding is that the and was clearing the upper and lower bits so that the unsigned min/max would only consider the byte or half word that it should and not any other values around it in memory.
https://github.com/llvm/llvm-project/pull/84566
More information about the llvm-branch-commits
mailing list