Skip to content

Commit

Permalink
Merge pull request #21087 from knn-k/pArrayTranslateTRTO
Browse files Browse the repository at this point in the history
Allow length 0 in arrayTranslateTRTO for Power
  • Loading branch information
0xdaryl authored Feb 21, 2025
2 parents f4a42d1 + b82c2b7 commit 5b2ffe7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/compiler/p/runtime/J9PPCArrayTranslate.spp
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,15 @@ __arrayTranslateTRTO:
! Residue loop, single element per iter
.L.__vectorResidue_TRTO:
mfctr r6
rlwimi. r5, r6, 4, 0, 27 ! add remaining elements from vector loop to residue loop
beq cr0, .L.__done_TRTO ! if 0 elements left, we are done
rlwimi r5, r6, 4, 0, 27 ! add remaining elements from vector loop to residue loop
.L.__alignResidue_TRTO:
cmpi cr0, 0, r5, 0
beq cr0, .L.__done_TRTO ! if 0 elements left, we are done
mtctr r5
addi r3, r3, -2 ! adjust so we can use lhzu
.L.__residueLoop_TRTO:
lhzu r5, 2(r3)
and. r6, r5, r8
and. r6, r5, r8
bne- .L.__done_TRTO
stb r5, 0(r4)
addi r4, r4, 1
Expand Down

0 comments on commit 5b2ffe7

Please sign in to comment.