Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow length 0 in arrayTranslateTRTO for Power #21087

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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