Skip to content

Instantly share code, notes, and snippets.

@rednaxelafx
Last active July 31, 2019 16:41
Show Gist options
  • Save rednaxelafx/1b4d0ccf2feadf89429e8ea2460fc4bd to your computer and use it in GitHub Desktop.
Save rednaxelafx/1b4d0ccf2feadf89429e8ea2460fc4bd to your computer and use it in GitHub Desktop.
HotSpot C2 SIMD vectorization demo
$ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintCompilation -XX:+PrintAssembly -XX:-BackgroundCompilation -XX:CompileCommand=exclude,TestSIMD,main -XX:-TieredCompilation TestSIMD
TestSIMD.doComputeConditional (TestSIMD.doComputeConditional(int[], int[], int[], int[], int)) [0x0000000102009920, 0x0000000102009b00] 480 bytes
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x000000010a6e95b8} 'doComputeConditional' '([I[I[I[II)V' in 'TestSIMD'
# parm0: rsi:rsi = '[I'
# parm1: rdx:rdx = '[I'
# parm2: rcx:rcx = '[I'
# parm3: r8:r8 = '[I'
# parm4: r9 = int
# [sp+0x20] (sp of caller)
0x0000000102009920: mov %eax,-0x14000(%rsp)
0x0000000102009927: sub $0x18,%rsp
0x000000010200992b: mov %rbp,0x10(%rsp)
0x0000000102009930: test %rdx,%rdx
0x0000000102009933: je 0x0000000102009acb ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x0000000102009939: test %rcx,%rcx
0x000000010200993c: je 0x0000000102009add ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
0x0000000102009942: test %r8,%r8 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@38 (line 14)
0x0000000102009945: je 0x0000000102009a23 ;*iconst_0 {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@0 (line 12)
0x000000010200994b: mov 0xc(%rsi),%r10d ; implicit exception: deoptimizes
; OopMap{rcx=Oop rdx=Oop rsi=Oop r8=Oop off=43}
0x000000010200994f: mov %r10d,%r11d
0x0000000102009952: mov %r11,%rbx
0x0000000102009955: dec %rbx
0x0000000102009958: test %r10d,%r10d
0x000000010200995b: je 0x0000000102009977 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@29 (line 14)
0x0000000102009961: mov 0xc(%rdx),%edi ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x0000000102009964: mov %edi,%eax
0x0000000102009966: cmp %rbx,%rax
0x0000000102009969: jbe 0x0000000102009a7a
0x000000010200996f: test %edi,%edi
0x0000000102009971: je 0x0000000102009a98 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@29 (line 14)
0x0000000102009977: test %r10d,%r10d
0x000000010200997a: je 0x0000000102009996
0x0000000102009980: mov 0xc(%rcx),%edi
0x0000000102009983: mov %edi,%eax
0x0000000102009985: cmp %rbx,%rax
0x0000000102009988: jbe 0x0000000102009aa7
0x000000010200998e: test %edi,%edi
0x0000000102009990: je 0x0000000102009a89 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
0x0000000102009996: test %r10d,%r10d
0x0000000102009999: je 0x00000001020099b6
0x000000010200999f: mov 0xc(%r8),%edi
0x00000001020099a3: mov %edi,%eax
0x00000001020099a5: cmp %rbx,%rax
0x00000001020099a8: jbe 0x0000000102009ab9
0x00000001020099ae: test %edi,%edi
0x00000001020099b0: je 0x0000000102009a53 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@38 (line 14)
0x00000001020099b6: cmp %rbx,%r11
0x00000001020099b9: ja 0x00000001020099c8
0x00000001020099bf: test %r10d,%r10d
0x00000001020099c2: jne 0x0000000102009a44 ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@41 (line 14)
0x00000001020099c8: mov $0x0,%r11d
0x00000001020099ce: jmpq 0x0000000102009a0b ;*iload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@3 (line 12)
0x00000001020099d3: nopl 0x0(%rax)
0x00000001020099da: nopw 0x0(%rax,%rax,1) ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@7 (line 12)
0x00000001020099e0: mov 0x10(%rdx,%r11,4),%ebx ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@29 (line 14)
0x00000001020099e5: cmp %r9d,%ebx
0x00000001020099e8: jle 0x0000000102009a62 ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x00000001020099ee: mov 0x10(%rcx,%r11,4),%edi ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
0x00000001020099f3: mov 0x10(%rsi,%r11,4),%eax ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@25 (line 14)
0x00000001020099f8: imul %edi,%ebx
0x00000001020099fb: imul 0x10(%r8,%r11,4),%ebx ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@34 (line 14)
0x0000000102009a01: add %eax,%ebx ;*iadd {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@40 (line 14)
0x0000000102009a03: mov %ebx,0x10(%rsi,%r11,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@41 (line 14)
0x0000000102009a08: inc %r11d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@42 (line 12)
0x0000000102009a0b: cmp %r11d,%r10d
0x0000000102009a0e: jg 0x00000001020099e0 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@7 (line 12)
0x0000000102009a10: mov 0x10(%rsp),%rbp
0x0000000102009a15: add $0x18,%rsp
0x0000000102009a19: test %eax,-0x1d3aa19(%rip) # 0x00000001002cf006
; {poll_return}
0x0000000102009a1f: vzeroupper
0x0000000102009a22: retq ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@38 (line 14)
0x0000000102009a23: mov $0x5,%r11
0x0000000102009a2a: mov $0xfffffff5,%r10d
0x0000000102009a30: mov %r10d,0x29c(%r15) ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x0000000102009a37: mov %r11,0x2a8(%r15)
0x0000000102009a3e: callq 0x0000000101fa25fe ; OopMap{rcx=Oop rdx=Oop rsi=Oop r8=Oop off=291}
;*iconst_0 {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@0 (line 12)
; {runtime_call}
0x0000000102009a43: nop ;*return {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@48 (line 17)
0x0000000102009a44: mov $0x7,%r11
0x0000000102009a4b: mov $0xffffffe5,%r10d
0x0000000102009a51: jmp 0x0000000102009a30
0x0000000102009a53: mov $0x6,%r11
0x0000000102009a5a: mov $0xffffffe5,%r10d
0x0000000102009a60: jmp 0x0000000102009a30 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@38 (line 14)
0x0000000102009a62: movl $0xffffffed,0x29c(%r15) ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x0000000102009a6d: mov %r12,0x2a8(%r15)
0x0000000102009a74: callq 0x0000000101fa25fe ; OopMap{rcx=Oop rdx=Oop rsi=Oop r8=Oop off=345}
;*iload {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@3 (line 12)
; {runtime_call}
0x0000000102009a79: nop
0x0000000102009a7a: mov $0x2,%r11
0x0000000102009a81: mov $0xffffffe5,%r10d
0x0000000102009a87: jmp 0x0000000102009a30
0x0000000102009a89: mov $0x4,%r11
0x0000000102009a90: mov $0xffffffe5,%r10d
0x0000000102009a96: jmp 0x0000000102009a30 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
0x0000000102009a98: mov $0x2,%r11
0x0000000102009a9f: mov $0xffffffe5,%r10d
0x0000000102009aa5: jmp 0x0000000102009a30 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@29 (line 14)
0x0000000102009aa7: mov $0x4,%r11
0x0000000102009aae: mov $0xffffffe5,%r10d
0x0000000102009ab4: jmpq 0x0000000102009a30
0x0000000102009ab9: mov $0x6,%r11
0x0000000102009ac0: mov $0xffffffe5,%r10d
0x0000000102009ac6: jmpq 0x0000000102009a30 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x0000000102009acb: mov $0x1,%r11
0x0000000102009ad2: mov $0xfffffff5,%r10d
0x0000000102009ad8: jmpq 0x0000000102009a30 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
0x0000000102009add: mov $0x3,%r11
0x0000000102009ae4: mov $0xfffffff5,%r10d
0x0000000102009aea: jmpq 0x0000000102009a30
[Exception Handler]
0x0000000102009aef: callq 0x0000000101ffdea0 ; {runtime_call}
0x0000000102009af4: nop
[Deopt Handler Code]
0x0000000102009af5: callq 0x0000000101fa2500 ; {runtime_call}
0x0000000102009afa: nop
[Stub Code]
0x0000000102009afb: hlt
0x0000000102009afc: hlt
0x0000000102009afd: hlt
0x0000000102009afe: hlt
0x0000000102009aff: hlt
TestSIMD.doComputeConditional([I[I[I[II)V [0x00000001174d38a0, 0x00000001174d3a58] 440 bytes
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x0000000125f6e628} 'doComputeConditional' '([I[I[I[II)V' in 'TestSIMD'
# parm0: rsi:rsi = '[I'
# parm1: rdx:rdx = '[I'
# parm2: rcx:rcx = '[I'
# parm3: r8:r8 = '[I'
# parm4: r9 = int
# [sp+0x50] (sp of caller)
0x00000001174d38a0: mov %eax,-0x14000(%rsp)
0x00000001174d38a7: push %rbp
0x00000001174d38a8: sub $0x40,%rsp ;*synchronization entry
; - TestSIMD::doComputeConditional@-1 (line 12)
0x00000001174d38ac: mov 0xc(%rsi),%ebp ;*arraylength {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@6 (line 12)
; implicit exception: dispatches to 0x00000001174d3a23
0x00000001174d38af: test %ebp,%ebp
0x00000001174d38b1: jbe 0x00000001174d39bb ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@7 (line 12)
0x00000001174d38b7: mov 0xc(%rdx),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
; implicit exception: dispatches to 0x00000001174d39fa
0x00000001174d38bb: test %r11d,%r11d
0x00000001174d38be: jbe 0x00000001174d39fa
0x00000001174d38c4: mov %ebp,%ebx
0x00000001174d38c6: dec %ebx
0x00000001174d38c8: cmp %r11d,%ebx
0x00000001174d38cb: jae 0x00000001174d39fa
0x00000001174d38d1: cmp %ebp,%ebx
0x00000001174d38d3: jae 0x00000001174d39fa
0x00000001174d38d9: mov 0xc(%rcx),%r10d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
; implicit exception: dispatches to 0x00000001174d39fa
0x00000001174d38dd: test %r10d,%r10d
0x00000001174d38e0: jbe 0x00000001174d39fa
0x00000001174d38e6: cmp %r10d,%ebx
0x00000001174d38e9: jae 0x00000001174d39fa
0x00000001174d38ef: mov 0xc(%r8),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@38 (line 14)
; implicit exception: dispatches to 0x00000001174d39fa
0x00000001174d38f3: test %r11d,%r11d
0x00000001174d38f6: jbe 0x00000001174d39fa
0x00000001174d38fc: cmp %r11d,%ebx
0x00000001174d38ff: jae 0x00000001174d39fa
0x00000001174d3905: mov 0x10(%rdx),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x00000001174d3909: cmp %r9d,%r11d
0x00000001174d390c: jle 0x00000001174d3a1e ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x00000001174d3912: mov 0x10(%rcx),%r10d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@33 (line 14)
0x00000001174d3916: mov 0x10(%rsi),%eax ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@25 (line 14)
0x00000001174d3919: imul %r11d,%r10d
0x00000001174d391d: imul 0x10(%r8),%r10d
0x00000001174d3922: add %eax,%r10d
0x00000001174d3925: mov %r10d,0x10(%rsi) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@41 (line 14)
0x00000001174d3929: mov $0x1,%r10d
0x00000001174d392f: cmp $0x1,%ebx
0x00000001174d3932: jle 0x00000001174d3992 ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@45 (line 12)
0x00000001174d3934: nopl 0x0(%rax,%rax,1)
0x00000001174d393c: data16 data16 xchg %ax,%ax ;*aload_1 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@10 (line 13)
0x00000001174d3940: mov 0x10(%rdx,%r10,4),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x00000001174d3945: cmp %r9d,%r11d
0x00000001174d3948: jle 0x00000001174d39ce ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x00000001174d394e: imul 0x10(%rcx,%r10,4),%r11d
0x00000001174d3954: imul 0x10(%r8,%r10,4),%r11d
0x00000001174d395a: add %r11d,0x10(%rsi,%r10,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@41 (line 14)
0x00000001174d395f: mov 0x14(%rdx,%r10,4),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x00000001174d3964: cmp %r9d,%r11d
0x00000001174d3967: jle 0x00000001174d39cb ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x00000001174d3969: imul 0x14(%rcx,%r10,4),%r11d
0x00000001174d396f: imul 0x14(%r8,%r10,4),%r11d
0x00000001174d3975: add %r11d,0x14(%rsi,%r10,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@41 (line 14)
0x00000001174d397a: add $0x2,%r10d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@42 (line 12)
0x00000001174d397e: cmp %ebx,%r10d
0x00000001174d3981: jl 0x00000001174d3940 ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@45 (line 12)
0x00000001174d3983: mov 0x108(%r15),%r11 ; ImmutableOopMap{r8=Oop rcx=Oop rdx=Oop rsi=Oop }
;*goto {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@45 (line 12)
0x00000001174d398a: test %eax,(%r11) ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@45 (line 12)
; {poll}
0x00000001174d398d: cmp %ebx,%r10d
0x00000001174d3990: jl 0x00000001174d3940
0x00000001174d3992: cmp %ebp,%r10d
0x00000001174d3995: jge 0x00000001174d39bb
0x00000001174d3997: nop ;*aload_1 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@10 (line 13)
0x00000001174d3998: mov 0x10(%rdx,%r10,4),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@13 (line 13)
0x00000001174d399d: cmp %r9d,%r11d
0x00000001174d39a0: jle 0x00000001174d39ce ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x00000001174d39a2: imul 0x10(%rcx,%r10,4),%r11d
0x00000001174d39a8: imul 0x10(%r8,%r10,4),%r11d
0x00000001174d39ae: add %r11d,0x10(%rsi,%r10,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@41 (line 14)
0x00000001174d39b3: inc %r10d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@42 (line 12)
0x00000001174d39b6: cmp %ebp,%r10d
0x00000001174d39b9: jl 0x00000001174d3998 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@7 (line 12)
0x00000001174d39bb: add $0x40,%rsp
0x00000001174d39bf: pop %rbp
0x00000001174d39c0: mov 0x108(%r15),%r10
0x00000001174d39c7: test %eax,(%r10) ; {poll_return}
0x00000001174d39ca: retq ;*aload_1 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@10 (line 13)
0x00000001174d39cb: inc %r10d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@42 (line 12)
0x00000001174d39ce: mov %rsi,%rbp
0x00000001174d39d1: mov %rdx,(%rsp)
0x00000001174d39d5: mov %rcx,0x8(%rsp)
0x00000001174d39da: mov %r8,0x10(%rsp)
0x00000001174d39df: mov %r10d,0x1c(%rsp)
0x00000001174d39e4: mov %r11d,0x20(%rsp)
0x00000001174d39e9: mov %r9d,0x24(%rsp)
0x00000001174d39ee: mov $0xffffff4d,%esi
0x00000001174d39f3: callq 0x0000000117496900 ; ImmutableOopMap{rbp=Oop [0]=Oop [8]=Oop [16]=Oop }
;*if_icmple {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
; {runtime_call UncommonTrapBlob}
0x00000001174d39f8: ud2 ;*if_icmple {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@16 (line 13)
0x00000001174d39fa: mov %rsi,(%rsp)
0x00000001174d39fe: mov %rdx,0x8(%rsp)
0x00000001174d3a03: mov %rcx,0x10(%rsp)
0x00000001174d3a08: mov %r8,0x18(%rsp)
0x00000001174d3a0d: mov %r9d,0x20(%rsp)
0x00000001174d3a12: mov $0xffffff7e,%esi
0x00000001174d3a17: callq 0x0000000117496900 ; ImmutableOopMap{[0]=Oop [8]=Oop [16]=Oop [24]=Oop }
;*if_icmpge {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@7 (line 12)
; {runtime_call UncommonTrapBlob}
0x00000001174d3a1c: ud2 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@7 (line 12)
0x00000001174d3a1e: xor %r10d,%r10d
0x00000001174d3a21: jmp 0x00000001174d39ce
0x00000001174d3a23: mov $0xfffffff6,%esi
0x00000001174d3a28: data16 xchg %ax,%ax
0x00000001174d3a2b: callq 0x0000000117496900 ; ImmutableOopMap{}
;*arraylength {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@6 (line 12)
; {runtime_call UncommonTrapBlob}
0x00000001174d3a30: ud2 ;*aload_1 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doComputeConditional@10 (line 13)
0x00000001174d3a32: hlt
0x00000001174d3a33: hlt
0x00000001174d3a34: hlt
0x00000001174d3a35: hlt
0x00000001174d3a36: hlt
0x00000001174d3a37: hlt
0x00000001174d3a38: hlt
0x00000001174d3a39: hlt
0x00000001174d3a3a: hlt
0x00000001174d3a3b: hlt
0x00000001174d3a3c: hlt
0x00000001174d3a3d: hlt
0x00000001174d3a3e: hlt
0x00000001174d3a3f: hlt
[Exception Handler]
[Stub Code]
0x00000001174d3a40: jmpq 0x00000001174cb880 ; {no_reloc}
[Deopt Handler Code]
0x00000001174d3a45: callq 0x00000001174d3a4a
0x00000001174d3a4a: subq $0x5,(%rsp)
0x00000001174d3a4f: jmpq 0x0000000117496520 ; {runtime_call DeoptimizationBlob}
0x00000001174d3a54: hlt
0x00000001174d3a55: hlt
0x00000001174d3a56: hlt
0x00000001174d3a57: hlt
Decoding compiled method 0x000000010441c9d0:
Code:
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x00000001114645b8} 'doComputeConditional' '([I[I[I[II)V' in 'TestSIMD'
# parm0: rsi:rsi = '[I'
# parm1: rdx:rdx = '[I'
# parm2: rcx:rcx = '[I'
# parm3: r8:r8 = '[I'
# parm4: r9 = int
# [sp+0x50] (sp of caller)
0x000000010441cb20: mov %eax,-0x14000(%rsp)
0x000000010441cb27: push %rbp
0x000000010441cb28: sub $0x40,%rsp ;*synchronization entry
; - TestSIMD::doComputeConditional@-1 (line 12)
0x000000010441cb2c: mov 0xc(%rsi),%edi ;*arraylength
; - TestSIMD::doComputeConditional@6 (line 12)
; implicit exception: dispatches to 0x000000010441cc89
0x000000010441cb2f: test %edi,%edi
0x000000010441cb31: jle 0x000000010441cc22 ;*if_icmpge
; - TestSIMD::doComputeConditional@7 (line 12)
0x000000010441cb37: mov 0xc(%rdx),%r11d ;*iaload
; - TestSIMD::doComputeConditional@13 (line 13)
; implicit exception: dispatches to 0x000000010441cc5d
0x000000010441cb3b: test %r11d,%r11d
0x000000010441cb3e: jbe 0x000000010441cc5d
0x000000010441cb44: mov %edi,%r10d
0x000000010441cb47: dec %r10d
0x000000010441cb4a: cmp %r11d,%r10d
0x000000010441cb4d: jae 0x000000010441cc5d
0x000000010441cb53: test %edi,%edi
0x000000010441cb55: jbe 0x000000010441cc5d
0x000000010441cb5b: cmp %edi,%r10d
0x000000010441cb5e: jae 0x000000010441cc5d ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
0x000000010441cb64: mov 0xc(%rcx),%r11d ;*iaload
; - TestSIMD::doComputeConditional@33 (line 14)
; implicit exception: dispatches to 0x000000010441cc5d
0x000000010441cb68: test %r11d,%r11d
0x000000010441cb6b: jbe 0x000000010441cc5d
0x000000010441cb71: cmp %r11d,%r10d
0x000000010441cb74: jae 0x000000010441cc5d ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
0x000000010441cb7a: mov 0xc(%r8),%ebx ;*iaload
; - TestSIMD::doComputeConditional@38 (line 14)
; implicit exception: dispatches to 0x000000010441cc5d
0x000000010441cb7e: test %ebx,%ebx
0x000000010441cb80: jbe 0x000000010441cc5d
0x000000010441cb86: cmp %ebx,%r10d
0x000000010441cb89: jae 0x000000010441cc5d ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
0x000000010441cb8f: mov 0x10(%rdx),%ebx ;*iaload
; - TestSIMD::doComputeConditional@13 (line 13)
0x000000010441cb92: cmp %r9d,%ebx
0x000000010441cb95: jle 0x000000010441cc85 ;*if_icmple
; - TestSIMD::doComputeConditional@16 (line 13)
0x000000010441cb9b: mov 0x10(%rcx),%r11d ;*iaload
; - TestSIMD::doComputeConditional@33 (line 14)
0x000000010441cb9f: mov 0x10(%rsi),%eax ;*iaload
; - TestSIMD::doComputeConditional@25 (line 14)
0x000000010441cba2: imul %ebx,%r11d
0x000000010441cba6: imul 0x10(%r8),%r11d
0x000000010441cbab: add %eax,%r11d
0x000000010441cbae: mov %r11d,0x10(%rsi) ;*iastore
; - TestSIMD::doComputeConditional@41 (line 14)
0x000000010441cbb2: mov $0x1,%eax
0x000000010441cbb7: cmp $0x1,%r10d
0x000000010441cbbb: jle 0x000000010441cbfe
0x000000010441cbbd: data16 xchg %ax,%ax ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
0x000000010441cbc0: mov 0x10(%rdx,%rax,4),%ebx ;*iaload
; - TestSIMD::doComputeConditional@13 (line 13)
0x000000010441cbc4: cmp %r9d,%ebx
0x000000010441cbc7: jle 0x000000010441cc30 ;*if_icmple
; - TestSIMD::doComputeConditional@16 (line 13)
0x000000010441cbc9: imul 0x10(%rcx,%rax,4),%ebx
0x000000010441cbce: imul 0x10(%r8,%rax,4),%ebx
0x000000010441cbd4: add %ebx,0x10(%rsi,%rax,4) ;*iastore
; - TestSIMD::doComputeConditional@41 (line 14)
0x000000010441cbd8: movslq %eax,%r11
0x000000010441cbdb: mov 0x14(%rdx,%r11,4),%ebx ;*iaload
; - TestSIMD::doComputeConditional@13 (line 13)
0x000000010441cbe0: cmp %r9d,%ebx
0x000000010441cbe3: jle 0x000000010441cc2e ;*if_icmple
; - TestSIMD::doComputeConditional@16 (line 13)
0x000000010441cbe5: imul 0x14(%rcx,%r11,4),%ebx
0x000000010441cbeb: imul 0x14(%r8,%r11,4),%ebx
0x000000010441cbf1: add %ebx,0x14(%rsi,%r11,4) ;*iastore
; - TestSIMD::doComputeConditional@41 (line 14)
0x000000010441cbf6: add $0x2,%eax ;*iinc
; - TestSIMD::doComputeConditional@42 (line 12)
0x000000010441cbf9: cmp %r10d,%eax
0x000000010441cbfc: jl 0x000000010441cbc0 ;*if_icmpge
; - TestSIMD::doComputeConditional@7 (line 12)
0x000000010441cbfe: cmp %edi,%eax
0x000000010441cc00: jge 0x000000010441cc22
0x000000010441cc02: xchg %ax,%ax ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
0x000000010441cc04: mov 0x10(%rdx,%rax,4),%ebx ;*iaload
; - TestSIMD::doComputeConditional@13 (line 13)
0x000000010441cc08: cmp %r9d,%ebx
0x000000010441cc0b: jle 0x000000010441cc30 ;*if_icmple
; - TestSIMD::doComputeConditional@16 (line 13)
0x000000010441cc0d: imul 0x10(%rcx,%rax,4),%ebx
0x000000010441cc12: imul 0x10(%r8,%rax,4),%ebx
0x000000010441cc18: add %ebx,0x10(%rsi,%rax,4) ;*iastore
; - TestSIMD::doComputeConditional@41 (line 14)
0x000000010441cc1c: inc %eax ;*iinc
; - TestSIMD::doComputeConditional@42 (line 12)
0x000000010441cc1e: cmp %edi,%eax
0x000000010441cc20: jl 0x000000010441cc04
0x000000010441cc22: add $0x40,%rsp
0x000000010441cc26: pop %rbp
0x000000010441cc27: test %eax,-0x2067c2d(%rip) # 0x00000001023b5000
; {poll_return}
0x000000010441cc2d: retq ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
0x000000010441cc2e: inc %eax ;*iinc
; - TestSIMD::doComputeConditional@42 (line 12)
0x000000010441cc30: mov %rsi,%rbp
0x000000010441cc33: mov %rdx,(%rsp)
0x000000010441cc37: mov %rcx,0x8(%rsp)
0x000000010441cc3c: mov %r8,0x10(%rsp)
0x000000010441cc41: mov %eax,0x1c(%rsp)
0x000000010441cc45: mov %ebx,0x20(%rsp)
0x000000010441cc49: mov %r9d,0x24(%rsp)
0x000000010441cc4e: mov $0xffffff65,%esi
0x000000010441cc53: callq 0x00000001043a81a0 ; OopMap{rbp=Oop [0]=Oop [8]=Oop [16]=Oop off=312}
;*if_icmple
; - TestSIMD::doComputeConditional@16 (line 13)
; {runtime_call}
0x000000010441cc58: callq 0x00000001038869dc ;*if_icmple
; - TestSIMD::doComputeConditional@16 (line 13)
; {runtime_call}
0x000000010441cc5d: mov %rsi,%rbp
0x000000010441cc60: mov %rdx,(%rsp)
0x000000010441cc64: mov %rcx,0x8(%rsp)
0x000000010441cc69: mov %r8,0x10(%rsp)
0x000000010441cc6e: mov %r9d,0x18(%rsp)
0x000000010441cc73: mov $0xffffff86,%esi
0x000000010441cc78: data16 xchg %ax,%ax
0x000000010441cc7b: callq 0x00000001043a81a0 ; OopMap{rbp=Oop [0]=Oop [8]=Oop [16]=Oop off=352}
;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
; {runtime_call}
0x000000010441cc80: callq 0x00000001038869dc ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
; {runtime_call}
0x000000010441cc85: xor %eax,%eax
0x000000010441cc87: jmp 0x000000010441cc30
0x000000010441cc89: mov $0xfffffff6,%esi
0x000000010441cc8e: nop
0x000000010441cc8f: callq 0x00000001043a81a0 ; OopMap{off=372}
;*arraylength
; - TestSIMD::doComputeConditional@6 (line 12)
; {runtime_call}
0x000000010441cc94: callq 0x00000001038869dc ;*aload_1
; - TestSIMD::doComputeConditional@10 (line 13)
; {runtime_call}
0x000000010441cc99: hlt
0x000000010441cc9a: hlt
0x000000010441cc9b: hlt
0x000000010441cc9c: hlt
0x000000010441cc9d: hlt
0x000000010441cc9e: hlt
0x000000010441cc9f: hlt
[Exception Handler]
[Stub Code]
0x000000010441cca0: jmpq 0x000000010440f760 ; {no_reloc}
[Deopt Handler Code]
0x000000010441cca5: callq 0x000000010441ccaa
0x000000010441ccaa: subq $0x5,(%rsp)
0x000000010441ccaf: jmpq 0x00000001043ea3c0 ; {runtime_call}
0x000000010441ccb4: hlt
0x000000010441ccb5: hlt
0x000000010441ccb6: hlt
0x000000010441ccb7: hlt
TestSIMD.doCompute (TestSIMD.doCompute(int[], int[], int[], int[])) [0x0000000102004520, 0x00000001020047c8] 680 bytes
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x000000010a6e9490} 'doCompute' '([I[I[I[I)V' in 'TestSIMD'
# parm0: rsi:rsi = '[I'
# parm1: rdx:rdx = '[I'
# parm2: rcx:rcx = '[I'
# parm3: r8:r8 = '[I'
# [sp+0x20] (sp of caller)
0x0000000102004520: mov %eax,-0x14000(%rsp)
0x0000000102004527: sub $0x18,%rsp
0x000000010200452b: mov %rbp,0x10(%rsp)
0x0000000102004530: test %rdx,%rdx
0x0000000102004533: je 0x0000000102004791 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@20 (line 7)
0x0000000102004539: test %rcx,%rcx
0x000000010200453c: je 0x0000000102004773 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@24 (line 7)
0x0000000102004542: test %r8,%r8 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@29 (line 7)
0x0000000102004545: je 0x0000000102004764 ;*iconst_0 {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@0 (line 6)
0x000000010200454b: mov 0xc(%rsi),%r10d ; implicit exception: deoptimizes
; OopMap{rcx=Oop rdx=Oop rsi=Oop r8=Oop off=43}
0x000000010200454f: mov %r10d,%r11d
0x0000000102004552: mov %r11,%r9
0x0000000102004555: dec %r9
0x0000000102004558: test %r10d,%r10d
0x000000010200455b: je 0x0000000102004577
0x0000000102004561: mov 0xc(%rdx),%ebx
0x0000000102004564: mov %ebx,%edi
0x0000000102004566: cmp %r9,%rdi
0x0000000102004569: jbe 0x0000000102004746
0x000000010200456f: test %ebx,%ebx
0x0000000102004571: je 0x0000000102004728 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@20 (line 7)
0x0000000102004577: test %r10d,%r10d
0x000000010200457a: je 0x0000000102004596
0x0000000102004580: mov 0xc(%rcx),%ebx
0x0000000102004583: mov %ebx,%edi
0x0000000102004585: cmp %r9,%rdi
0x0000000102004588: jbe 0x00000001020047a3
0x000000010200458e: test %ebx,%ebx
0x0000000102004590: je 0x0000000102004755 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@24 (line 7)
0x0000000102004596: test %r10d,%r10d
0x0000000102004599: je 0x00000001020045b6
0x000000010200459f: mov 0xc(%r8),%ebx
0x00000001020045a3: mov %ebx,%edi
0x00000001020045a5: cmp %r9,%rdi
0x00000001020045a8: jbe 0x0000000102004782
0x00000001020045ae: test %ebx,%ebx
0x00000001020045b0: je 0x0000000102004737 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@29 (line 7)
0x00000001020045b6: cmp %r9,%r11
0x00000001020045b9: ja 0x00000001020045c8
0x00000001020045bf: test %r10d,%r10d
0x00000001020045c2: jne 0x0000000102004707 ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001020045c8: test %r10d,%r10d
0x00000001020045cb: je 0x00000001020046aa ;*ifle {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@35 (line 104)
; - TestSIMD::doCompute@32 (line 7)
0x00000001020045d1: lea 0x10(%rdx),%r10
0x00000001020045d5: lea 0x10(%r8),%r8
0x00000001020045d9: lea 0x10(%rsi),%rbx
0x00000001020045dd: lea 0x10(%rcx),%rcx ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001020045e1: lea -0x8(%r11),%rdi
0x00000001020045e5: test %rdi,%rdi
0x00000001020045e8: mov $0x0,%rdx
0x00000001020045ef: jge 0x00000001020046d0 ;*ifeq {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@90 (line 107)
; - TestSIMD::doCompute@32 (line 7)
0x00000001020045f5: lea -0x4(%r11),%rdi
0x00000001020045f9: cmp %rdi,%rdx
0x00000001020045fc: jg 0x0000000102004632 ;*ifeq {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::a@122 (line 284)
; - com.oracle.graal.enterprise.R.n::a@132 (line 257)
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@150 (line 114)
; - TestSIMD::doCompute@32 (line 7)
0x0000000102004602: vmovdqu (%rcx,%rdx,4),%xmm0
0x0000000102004607: vmovdqu (%rbx,%rdx,4),%xmm1
0x000000010200460c: vmovdqu (%r8,%rdx,4),%xmm2
0x0000000102004612: vmovdqu (%r10,%rdx,4),%xmm3
0x0000000102004618: vpmulld %xmm3,%xmm0,%xmm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@25 (line 7)
0x000000010200461d: vpmulld %xmm2,%xmm0,%xmm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@30 (line 7)
0x0000000102004622: vpaddd %xmm1,%xmm0,%xmm0 ;*iadd {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@31 (line 7)
0x0000000102004626: vmovdqu %xmm0,(%rbx,%rdx,4)
0x000000010200462b: lea 0x4(%rdx),%rdi
0x000000010200462f: mov %rdi,%rdx ;*iload {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::a@185 (line 298)
; - com.oracle.graal.enterprise.R.n::a@132 (line 257)
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@150 (line 114)
; - TestSIMD::doCompute@32 (line 7)
0x0000000102004632: lea -0x2(%r11),%r11
0x0000000102004636: cmp %r11,%rdx
0x0000000102004639: jg 0x0000000102004672 ;*ifeq {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::a@122 (line 284)
; - com.oracle.graal.enterprise.R.n::a@132 (line 257)
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@150 (line 114)
; - TestSIMD::doCompute@32 (line 7)
0x000000010200463f: vmovq (%rcx,%rdx,4),%xmm0
0x0000000102004645: vmovq (%rbx,%rdx,4),%xmm1
0x000000010200464b: vmovq (%r8,%rdx,4),%xmm2
0x0000000102004651: vmovq (%r10,%rdx,4),%xmm3
0x0000000102004657: vpmulld %xmm3,%xmm0,%xmm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@25 (line 7)
0x000000010200465c: vpmulld %xmm2,%xmm0,%xmm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@30 (line 7)
0x0000000102004661: vpaddd %xmm1,%xmm0,%xmm0 ;*iadd {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@31 (line 7)
0x0000000102004665: vmovq %xmm0,(%rbx,%rdx,4)
0x000000010200466b: lea 0x2(%rdx),%r11
0x000000010200466f: mov %r11,%rdx ;*iload {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::a@185 (line 298)
; - com.oracle.graal.enterprise.R.n::a@132 (line 257)
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@150 (line 114)
; - TestSIMD::doCompute@32 (line 7)
0x0000000102004672: cmp %r9,%rdx
0x0000000102004675: jg 0x00000001020046bd ;*ifeq {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::a@122 (line 284)
; - com.oracle.graal.enterprise.R.n::a@132 (line 257)
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@150 (line 114)
; - TestSIMD::doCompute@32 (line 7)
0x000000010200467b: mov (%rcx,%rdx,4),%r11d
0x000000010200467f: mov (%rbx,%rdx,4),%r9d
0x0000000102004683: mov (%r8,%rdx,4),%r8d
0x0000000102004687: imul (%r10,%rdx,4),%r11d
0x000000010200468c: imul %r8d,%r11d ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@30 (line 7)
0x0000000102004690: add %r9d,%r11d ;*iadd {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@31 (line 7)
0x0000000102004693: mov %r11d,(%rbx,%rdx,4)
0x0000000102004697: mov 0x10(%rsp),%rbp
0x000000010200469c: add $0x18,%rsp
0x00000001020046a0: test %eax,-0x1d356a0(%rip) # 0x00000001002cf006
; {poll_return}
0x00000001020046a6: vzeroupper
0x00000001020046a9: retq ;*ifle {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@35 (line 104)
; - TestSIMD::doCompute@32 (line 7)
0x00000001020046aa: mov 0x10(%rsp),%rbp
0x00000001020046af: add $0x18,%rsp
0x00000001020046b3: test %eax,-0x1d356b3(%rip) # 0x00000001002cf006
; {poll_return}
0x00000001020046b9: vzeroupper
0x00000001020046bc: retq ;*ifeq {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::a@122 (line 284)
; - com.oracle.graal.enterprise.R.n::a@132 (line 257)
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@150 (line 114)
; - TestSIMD::doCompute@32 (line 7)
0x00000001020046bd: mov 0x10(%rsp),%rbp
0x00000001020046c2: add $0x18,%rsp
0x00000001020046c6: test %eax,-0x1d356c6(%rip) # 0x00000001002cf006
; {poll_return}
0x00000001020046cc: vzeroupper
0x00000001020046cf: retq
0x00000001020046d0: vmovdqu (%rcx,%rdx,4),%ymm0
0x00000001020046d5: vmovdqu (%rbx,%rdx,4),%ymm1
0x00000001020046da: vmovdqu (%r8,%rdx,4),%ymm2
0x00000001020046e0: vmovdqu (%r10,%rdx,4),%ymm3
0x00000001020046e6: vpmulld %ymm3,%ymm0,%ymm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@25 (line 7)
0x00000001020046eb: vpmulld %ymm2,%ymm0,%ymm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@30 (line 7)
0x00000001020046f0: vpaddd %ymm1,%ymm0,%ymm0 ;*iadd {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@31 (line 7)
0x00000001020046f4: vmovdqu %ymm0,(%rbx,%rdx,4)
0x00000001020046f9: lea 0x8(%rdx),%rdx
0x00000001020046fd: cmp %rdi,%rdx
0x0000000102004700: jle 0x00000001020046d0
0x0000000102004702: jmpq 0x00000001020045f5 ;*ifne {reexecute=0 rethrow=0 return_oop=0}
; - com.oracle.graal.enterprise.R.n::vectorConsumerLoop@127 (line 111)
; - TestSIMD::doCompute@32 (line 7)
0x0000000102004707: mov $0x7,%r11
0x000000010200470e: mov $0xffffffe5,%r10d
0x0000000102004714: mov %r10d,0x29c(%r15) ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@20 (line 7)
0x000000010200471b: mov %r11,0x2a8(%r15)
0x0000000102004722: callq 0x0000000101fa25fe ; OopMap{rcx=Oop rdx=Oop rsi=Oop r8=Oop off=519}
;*iconst_0 {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@0 (line 6)
; {runtime_call}
0x0000000102004727: nop
0x0000000102004728: mov $0x2,%r11
0x000000010200472f: mov $0xffffffe5,%r10d
0x0000000102004735: jmp 0x0000000102004714 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@20 (line 7)
0x0000000102004737: mov $0x6,%r11
0x000000010200473e: mov $0xffffffe5,%r10d
0x0000000102004744: jmp 0x0000000102004714 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@29 (line 7)
0x0000000102004746: mov $0x2,%r11
0x000000010200474d: mov $0xffffffe5,%r10d
0x0000000102004753: jmp 0x0000000102004714
0x0000000102004755: mov $0x4,%r11
0x000000010200475c: mov $0xffffffe5,%r10d
0x0000000102004762: jmp 0x0000000102004714
0x0000000102004764: mov $0x5,%r11
0x000000010200476b: mov $0xfffffff5,%r10d
0x0000000102004771: jmp 0x0000000102004714 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@24 (line 7)
0x0000000102004773: mov $0x3,%r11
0x000000010200477a: mov $0xfffffff5,%r10d
0x0000000102004780: jmp 0x0000000102004714
0x0000000102004782: mov $0x6,%r11
0x0000000102004789: mov $0xffffffe5,%r10d
0x000000010200478f: jmp 0x0000000102004714 ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@20 (line 7)
0x0000000102004791: mov $0x1,%r11
0x0000000102004798: mov $0xfffffff5,%r10d
0x000000010200479e: jmpq 0x0000000102004714
0x00000001020047a3: mov $0x4,%r11
0x00000001020047aa: mov $0xffffffe5,%r10d
0x00000001020047b0: jmpq 0x0000000102004714
[Exception Handler]
0x00000001020047b5: callq 0x0000000101ffdea0 ; {runtime_call}
0x00000001020047ba: nop
[Deopt Handler Code]
0x00000001020047bb: callq 0x0000000101fa2500 ; {runtime_call}
0x00000001020047c0: nop
[Stub Code]
0x00000001020047c1: hlt
0x00000001020047c2: hlt
0x00000001020047c3: hlt
0x00000001020047c4: hlt
0x00000001020047c5: hlt
0x00000001020047c6: hlt
0x00000001020047c7: hlt
TestSIMD.doCompute([I[I[I[I)V [0x00000001156c60a0, 0x00000001156c6298] 504 bytes
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x000000012327f4c8} 'doCompute' '([I[I[I[I)V' in 'TestSIMD'
# parm0: rsi:rsi = '[I'
# parm1: rdx:rdx = '[I'
# parm2: rcx:rcx = '[I'
# parm3: r8:r8 = '[I'
# [sp+0x40] (sp of caller)
0x00000001156c60a0: mov %eax,-0x14000(%rsp)
0x00000001156c60a7: push %rbp
0x00000001156c60a8: sub $0x30,%rsp ;*synchronization entry
; - TestSIMD::doCompute@-1 (line 6)
0x00000001156c60ac: mov 0xc(%rsi),%ebp ;*arraylength {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@6 (line 6)
; implicit exception: dispatches to 0x00000001156c625e
0x00000001156c60af: test %ebp,%ebp
0x00000001156c60b1: jbe 0x00000001156c6226 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@7 (line 6)
0x00000001156c60b7: mov %ebp,%r10d
0x00000001156c60ba: dec %r10d
0x00000001156c60bd: cmp %ebp,%r10d
0x00000001156c60c0: jae 0x00000001156c6239
0x00000001156c60c6: mov 0xc(%rdx),%r9d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@20 (line 7)
; implicit exception: dispatches to 0x00000001156c6239
0x00000001156c60ca: test %r9d,%r9d
0x00000001156c60cd: jbe 0x00000001156c6239
0x00000001156c60d3: cmp %r9d,%r10d
0x00000001156c60d6: jae 0x00000001156c6239
0x00000001156c60dc: mov 0xc(%rcx),%r11d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@24 (line 7)
; implicit exception: dispatches to 0x00000001156c6239
0x00000001156c60e0: test %r11d,%r11d
0x00000001156c60e3: jbe 0x00000001156c6239
0x00000001156c60e9: cmp %r11d,%r10d
0x00000001156c60ec: jae 0x00000001156c6239
0x00000001156c60f2: mov 0xc(%r8),%r9d ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@29 (line 7)
; implicit exception: dispatches to 0x00000001156c6239
0x00000001156c60f6: test %r9d,%r9d
0x00000001156c60f9: jbe 0x00000001156c6239
0x00000001156c60ff: cmp %r9d,%r10d
0x00000001156c6102: jae 0x00000001156c6239
0x00000001156c6108: mov %esi,%r11d
0x00000001156c610b: shr $0x2,%r11d
0x00000001156c610f: and $0x7,%r11d
0x00000001156c6113: mov $0x3,%ebx
0x00000001156c6118: sub %r11d,%ebx
0x00000001156c611b: and $0x7,%ebx
0x00000001156c611e: inc %ebx
0x00000001156c6120: cmp %ebp,%ebx
0x00000001156c6122: cmovg %ebp,%ebx
0x00000001156c6125: xor %r9d,%r9d ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@10 (line 7)
0x00000001156c6128: mov 0x10(%rdx,%r9,4),%edi
0x00000001156c612d: imul 0x10(%rcx,%r9,4),%edi
0x00000001156c6133: imul 0x10(%r8,%r9,4),%edi
0x00000001156c6139: add %edi,0x10(%rsi,%r9,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001156c613e: inc %r9d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@33 (line 6)
0x00000001156c6141: cmp %ebx,%r9d
0x00000001156c6144: jl 0x00000001156c6128 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@7 (line 6)
0x00000001156c6146: mov %ebp,%r11d
0x00000001156c6149: add $0xfffffff1,%r11d
0x00000001156c614d: mov $0x80000000,%edi
0x00000001156c6152: cmp %r11d,%r10d
0x00000001156c6155: cmovl %edi,%r11d
0x00000001156c6159: cmp %r11d,%r9d
0x00000001156c615c: jge 0x00000001156c6200 ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@10 (line 7)
0x00000001156c6162: vmovdqu 0x10(%rdx,%r9,4),%ymm0
0x00000001156c6169: vpmulld 0x10(%rcx,%r9,4),%ymm0,%ymm0
0x00000001156c6170: vpmulld 0x10(%r8,%r9,4),%ymm0,%ymm0
0x00000001156c6177: vpaddd 0x10(%rsi,%r9,4),%ymm0,%ymm0
0x00000001156c617e: vmovdqu %ymm0,0x10(%rsi,%r9,4)
0x00000001156c6185: vmovdqu 0x30(%rdx,%r9,4),%ymm0
0x00000001156c618c: vpmulld 0x30(%rcx,%r9,4),%ymm0,%ymm0
0x00000001156c6193: vpmulld 0x30(%r8,%r9,4),%ymm0,%ymm0
0x00000001156c619a: vpaddd 0x30(%rsi,%r9,4),%ymm0,%ymm0
0x00000001156c61a1: vmovdqu %ymm0,0x30(%rsi,%r9,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001156c61a8: add $0x10,%r9d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@33 (line 6)
0x00000001156c61ac: cmp %r11d,%r9d
0x00000001156c61af: jl 0x00000001156c6162 ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@36 (line 6)
0x00000001156c61b1: mov 0x108(%r15),%r14 ; ImmutableOopMap{r8=Oop rcx=Oop rdx=Oop rsi=Oop }
;*goto {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@36 (line 6)
0x00000001156c61b8: test %eax,(%r14) ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@36 (line 6)
; {poll}
0x00000001156c61bb: cmp %r11d,%r9d
0x00000001156c61be: jl 0x00000001156c6162
0x00000001156c61c0: mov %ebp,%r11d
0x00000001156c61c3: add $0xfffffff9,%r11d
0x00000001156c61c7: cmp %r11d,%r10d
0x00000001156c61ca: cmovl %edi,%r11d
0x00000001156c61ce: cmp %r11d,%r9d
0x00000001156c61d1: jge 0x00000001156c6200
0x00000001156c61d3: nop ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@10 (line 7)
0x00000001156c61d4: vmovdqu 0x10(%rdx,%r9,4),%ymm0
0x00000001156c61db: vpmulld 0x10(%rcx,%r9,4),%ymm0,%ymm0
0x00000001156c61e2: vpmulld 0x10(%r8,%r9,4),%ymm0,%ymm0
0x00000001156c61e9: vpaddd 0x10(%rsi,%r9,4),%ymm0,%ymm0
0x00000001156c61f0: vmovdqu %ymm0,0x10(%rsi,%r9,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001156c61f7: add $0x8,%r9d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@33 (line 6)
0x00000001156c61fb: cmp %r11d,%r9d
0x00000001156c61fe: jl 0x00000001156c61d4 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@7 (line 6)
0x00000001156c6200: cmp %ebp,%r9d
0x00000001156c6203: jge 0x00000001156c6226
0x00000001156c6205: data16 xchg %ax,%ax ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@10 (line 7)
0x00000001156c6208: mov 0x10(%rdx,%r9,4),%r11d
0x00000001156c620d: imul 0x10(%rcx,%r9,4),%r11d
0x00000001156c6213: imul 0x10(%r8,%r9,4),%r11d
0x00000001156c6219: add %r11d,0x10(%rsi,%r9,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001156c621e: inc %r9d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@33 (line 6)
0x00000001156c6221: cmp %ebp,%r9d
0x00000001156c6224: jl 0x00000001156c6208 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@7 (line 6)
0x00000001156c6226: vzeroupper
0x00000001156c6229: add $0x30,%rsp
0x00000001156c622d: pop %rbp
0x00000001156c622e: mov 0x108(%r15),%r10
0x00000001156c6235: test %eax,(%r10) ; {poll_return}
0x00000001156c6238: retq
0x00000001156c6239: mov %rsi,(%rsp)
0x00000001156c623d: mov %rdx,0x8(%rsp)
0x00000001156c6242: mov %rcx,0x10(%rsp)
0x00000001156c6247: mov %r8,0x18(%rsp)
0x00000001156c624c: mov $0xffffff7e,%esi
0x00000001156c6251: data16 xchg %ax,%ax
0x00000001156c6254: vzeroupper
0x00000001156c6257: callq 0x0000000115687900 ; ImmutableOopMap{[0]=Oop [8]=Oop [16]=Oop [24]=Oop }
;*if_icmpge {reexecute=1 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@7 (line 6)
; {runtime_call UncommonTrapBlob}
0x00000001156c625c: ud2 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@7 (line 6)
0x00000001156c625e: mov $0xfffffff6,%esi
0x00000001156c6263: nop
0x00000001156c6264: vzeroupper
0x00000001156c6267: callq 0x0000000115687900 ; ImmutableOopMap{}
;*arraylength {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@6 (line 6)
; {runtime_call UncommonTrapBlob}
0x00000001156c626c: ud2 ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@10 (line 7)
0x00000001156c626e: hlt
0x00000001156c626f: hlt
0x00000001156c6270: hlt
0x00000001156c6271: hlt
0x00000001156c6272: hlt
0x00000001156c6273: hlt
0x00000001156c6274: hlt
0x00000001156c6275: hlt
0x00000001156c6276: hlt
0x00000001156c6277: hlt
0x00000001156c6278: hlt
0x00000001156c6279: hlt
0x00000001156c627a: hlt
0x00000001156c627b: hlt
0x00000001156c627c: hlt
0x00000001156c627d: hlt
0x00000001156c627e: hlt
0x00000001156c627f: hlt
[Exception Handler]
[Stub Code]
0x00000001156c6280: jmpq 0x00000001156bc680 ; {no_reloc}
[Deopt Handler Code]
0x00000001156c6285: callq 0x00000001156c628a
0x00000001156c628a: subq $0x5,(%rsp)
0x00000001156c628f: jmpq 0x0000000115687520 ; {runtime_call DeoptimizationBlob}
0x00000001156c6294: hlt
0x00000001156c6295: hlt
0x00000001156c6296: hlt
0x00000001156c6297: hlt
Decoding compiled method 0x000000010f4115d0:
Code:
[Disassembling for mach='i386:x86-64']
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x0000000113d4a460} 'doCompute' '([I[I[I[I)V' in 'TestSIMD'
# parm0: rsi:rsi = '[I'
# parm1: rdx:rdx = '[I'
# parm2: rcx:rcx = '[I'
# parm3: r8:r8 = '[I'
# [sp+0x40] (sp of caller)
0x000000010f411720: mov %eax,-0x14000(%rsp)
0x000000010f411727: push %rbp
0x000000010f411728: sub $0x30,%rsp ;*synchronization entry
; - TestSIMD::doCompute@-1 (line 6)
0x000000010f41172c: mov 0xc(%rsi),%r9d ;*arraylength
; - TestSIMD::doCompute@6 (line 6)
; implicit exception: dispatches to 0x000000010f41185d
0x000000010f411730: test %r9d,%r9d
0x000000010f411733: jle 0x000000010f41182e ;*if_icmpge
; - TestSIMD::doCompute@7 (line 6)
0x000000010f411739: test %r9d,%r9d
0x000000010f41173c: jbe 0x000000010f41183a
0x000000010f411742: mov %r9d,%edi
0x000000010f411745: dec %edi
0x000000010f411747: cmp %r9d,%edi
0x000000010f41174a: jae 0x000000010f41183a ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
0x000000010f411750: mov 0xc(%rdx),%r11d ;*iaload
; - TestSIMD::doCompute@20 (line 7)
; implicit exception: dispatches to 0x000000010f41183a
0x000000010f411754: test %r11d,%r11d
0x000000010f411757: jbe 0x000000010f41183a
0x000000010f41175d: cmp %r11d,%edi
0x000000010f411760: jae 0x000000010f41183a ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
0x000000010f411766: mov 0xc(%rcx),%r10d ;*iaload
; - TestSIMD::doCompute@24 (line 7)
; implicit exception: dispatches to 0x000000010f41183a
0x000000010f41176a: test %r10d,%r10d
0x000000010f41176d: jbe 0x000000010f41183a
0x000000010f411773: cmp %r10d,%edi
0x000000010f411776: jae 0x000000010f41183a ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
0x000000010f41177c: mov 0xc(%r8),%r11d ;*iaload
; - TestSIMD::doCompute@29 (line 7)
; implicit exception: dispatches to 0x000000010f41183a
0x000000010f411780: test %r11d,%r11d
0x000000010f411783: jbe 0x000000010f41183a
0x000000010f411789: cmp %r11d,%edi
0x000000010f41178c: jae 0x000000010f41183a
0x000000010f411792: mov $0x2,%r10d
0x000000010f411798: cmp %r10d,%r9d
0x000000010f41179b: mov %r9d,%eax
0x000000010f41179e: cmovg %r10d,%eax
0x000000010f4117a2: xor %r10d,%r10d ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
0x000000010f4117a5: mov 0x10(%rdx,%r10,4),%r11d
0x000000010f4117aa: imul 0x10(%rcx,%r10,4),%r11d
0x000000010f4117b0: imul 0x10(%r8,%r10,4),%r11d
0x000000010f4117b6: add %r11d,0x10(%rsi,%r10,4) ;*iastore
; - TestSIMD::doCompute@32 (line 7)
0x000000010f4117bb: inc %r10d ;*iinc
; - TestSIMD::doCompute@33 (line 6)
0x000000010f4117be: cmp %eax,%r10d
0x000000010f4117c1: jl 0x000000010f4117a5 ;*if_icmpge
; - TestSIMD::doCompute@7 (line 6)
0x000000010f4117c3: cmp %edi,%r10d
0x000000010f4117c6: jge 0x000000010f41180a
0x000000010f4117c8: nopl 0x0(%rax,%rax,1) ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
0x000000010f4117d0: vmovq 0x10(%rsi,%r10,4),%xmm0
0x000000010f4117d7: vmovq 0x10(%r8,%r10,4),%xmm1
0x000000010f4117de: vmovq 0x10(%rcx,%r10,4),%xmm2
0x000000010f4117e5: vmovq 0x10(%rdx,%r10,4),%xmm3
0x000000010f4117ec: vpmulld %xmm3,%xmm2,%xmm2
0x000000010f4117f1: vpmulld %xmm1,%xmm2,%xmm1
0x000000010f4117f6: vpaddd %xmm0,%xmm1,%xmm0
0x000000010f4117fa: vmovq %xmm0,0x10(%rsi,%r10,4) ;*iastore
; - TestSIMD::doCompute@32 (line 7)
0x000000010f411801: add $0x2,%r10d ;*iinc
; - TestSIMD::doCompute@33 (line 6)
0x000000010f411805: cmp %edi,%r10d
0x000000010f411808: jl 0x000000010f4117d0 ;*if_icmpge
; - TestSIMD::doCompute@7 (line 6)
0x000000010f41180a: cmp %r9d,%r10d
0x000000010f41180d: jge 0x000000010f41182e
0x000000010f41180f: nop ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
0x000000010f411810: mov 0x10(%rdx,%r10,4),%ebx
0x000000010f411815: imul 0x10(%rcx,%r10,4),%ebx
0x000000010f41181b: imul 0x10(%r8,%r10,4),%ebx
0x000000010f411821: add %ebx,0x10(%rsi,%r10,4) ;*iastore
; - TestSIMD::doCompute@32 (line 7)
0x000000010f411826: inc %r10d ;*iinc
; - TestSIMD::doCompute@33 (line 6)
0x000000010f411829: cmp %r9d,%r10d
0x000000010f41182c: jl 0x000000010f411810
0x000000010f41182e: add $0x30,%rsp
0x000000010f411832: pop %rbp
0x000000010f411833: test %eax,-0x20f2839(%rip) # 0x000000010d31f000
; {poll_return}
0x000000010f411839: retq
0x000000010f41183a: mov %rsi,%rbp
0x000000010f41183d: mov %rdx,(%rsp)
0x000000010f411841: mov %rcx,0x8(%rsp)
0x000000010f411846: mov %r8,0x10(%rsp)
0x000000010f41184b: mov $0xffffff86,%esi
0x000000010f411850: data16 xchg %ax,%ax
0x000000010f411853: callq 0x000000010f3a81a0 ; OopMap{rbp=Oop [0]=Oop [8]=Oop [16]=Oop off=312}
;*aload_0
; - TestSIMD::doCompute@10 (line 7)
; {runtime_call}
0x000000010f411858: callq 0x000000010e8869dc ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
; {runtime_call}
0x000000010f41185d: mov $0xfffffff6,%esi
0x000000010f411862: nop
0x000000010f411863: callq 0x000000010f3a81a0 ; OopMap{off=328}
;*arraylength
; - TestSIMD::doCompute@6 (line 6)
; {runtime_call}
0x000000010f411868: callq 0x000000010e8869dc ;*aload_0
; - TestSIMD::doCompute@10 (line 7)
; {runtime_call}
0x000000010f41186d: hlt
0x000000010f41186e: hlt
0x000000010f41186f: hlt
0x000000010f411870: hlt
0x000000010f411871: hlt
0x000000010f411872: hlt
0x000000010f411873: hlt
0x000000010f411874: hlt
0x000000010f411875: hlt
0x000000010f411876: hlt
0x000000010f411877: hlt
0x000000010f411878: hlt
0x000000010f411879: hlt
0x000000010f41187a: hlt
0x000000010f41187b: hlt
0x000000010f41187c: hlt
0x000000010f41187d: hlt
0x000000010f41187e: hlt
0x000000010f41187f: hlt
[Exception Handler]
[Stub Code]
0x000000010f411880: jmpq 0x000000010f40f760 ; {no_reloc}
[Deopt Handler Code]
0x000000010f411885: callq 0x000000010f41188a
0x000000010f41188a: subq $0x5,(%rsp)
0x000000010f41188f: jmpq 0x000000010f3ea3c0 ; {runtime_call}
0x000000010f411894: hlt
0x000000010f411895: hlt
0x000000010f411896: hlt
0x000000010f411897: hlt
0x00000001020046d0: vmovdqu (%rcx,%rdx,4),%ymm0
0x00000001020046d5: vmovdqu (%rbx,%rdx,4),%ymm1
0x00000001020046da: vmovdqu (%r8,%rdx,4),%ymm2
0x00000001020046e0: vmovdqu (%r10,%rdx,4),%ymm3
0x00000001020046e6: vpmulld %ymm3,%ymm0,%ymm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@25 (line 7)
0x00000001020046eb: vpmulld %ymm2,%ymm0,%ymm0 ;*imul {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@30 (line 7)
0x00000001020046f0: vpaddd %ymm1,%ymm0,%ymm0 ;*iadd {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@31 (line 7)
0x00000001020046f4: vmovdqu %ymm0,(%rbx,%rdx,4)
0x00000001020046f9: lea 0x8(%rdx),%rdx
0x00000001020046fd: cmp %rdi,%rdx
0x0000000102004700: jle 0x00000001020046d0
0x00000001156c6162: vmovdqu 0x10(%rdx,%r9,4),%ymm0
0x00000001156c6169: vpmulld 0x10(%rcx,%r9,4),%ymm0,%ymm0
0x00000001156c6170: vpmulld 0x10(%r8,%r9,4),%ymm0,%ymm0
0x00000001156c6177: vpaddd 0x10(%rsi,%r9,4),%ymm0,%ymm0
0x00000001156c617e: vmovdqu %ymm0,0x10(%rsi,%r9,4)
0x00000001156c6185: vmovdqu 0x30(%rdx,%r9,4),%ymm0
0x00000001156c618c: vpmulld 0x30(%rcx,%r9,4),%ymm0,%ymm0
0x00000001156c6193: vpmulld 0x30(%r8,%r9,4),%ymm0,%ymm0
0x00000001156c619a: vpaddd 0x30(%rsi,%r9,4),%ymm0,%ymm0
0x00000001156c61a1: vmovdqu %ymm0,0x30(%rsi,%r9,4) ;*iastore {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@32 (line 7)
0x00000001156c61a8: add $0x10,%r9d ;*iinc {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@33 (line 6)
0x00000001156c61ac: cmp %r11d,%r9d
0x00000001156c61af: jl 0x00000001156c6162 ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - TestSIMD::doCompute@36 (line 6)
0x000000010f4117d0: vmovq 0x10(%rsi,%r10,4),%xmm0
0x000000010f4117d7: vmovq 0x10(%r8,%r10,4),%xmm1
0x000000010f4117de: vmovq 0x10(%rcx,%r10,4),%xmm2
0x000000010f4117e5: vmovq 0x10(%rdx,%r10,4),%xmm3
0x000000010f4117ec: vpmulld %xmm3,%xmm2,%xmm2
0x000000010f4117f1: vpmulld %xmm1,%xmm2,%xmm1
0x000000010f4117f6: vpaddd %xmm0,%xmm1,%xmm0
0x000000010f4117fa: vmovq %xmm0,0x10(%rsi,%r10,4) ;*iastore
; - TestSIMD::doCompute@32 (line 7)
0x000000010f411801: add $0x2,%r10d ;*iinc
; - TestSIMD::doCompute@33 (line 6)
0x000000010f411805: cmp %edi,%r10d
0x000000010f411808: jl 0x000000010f4117d0 ;*if_icmpge
; - TestSIMD::doCompute@7 (line 6)
#include <cstddef>
#include <cstdint>
void do_compute(int32_t* a, int32_t* x, int32_t* y, int32_t* z, size_t length) {
for (size_t i = 0; i < length; i++) {
a[i] = a[i] + x[i] * y[i] * z[i];
}
}
void do_compute(int32_t* a, int32_t* x, int32_t* y, int32_t* z, size_t length, int32_t threshold) {
for (size_t i = 0; i < length; i++) {
if (x[i] > threshold) {
a[i] = a[i] + x[i] * y[i] * z[i];
}
}
}
// See https://godbolt.org/g/3p6D1n for Clang's compilation results
// Copied inline below just in case
/*
do_compute(int*, int*, int*, int*, unsigned long): # @do_compute(int*, int*, int*, int*, unsigned long)
push rbp
push r15
push r14
push rbx
test r8, r8
je .LBB0_14
cmp r8, 31
ja .LBB0_8
xor r10d, r10d
jmp .LBB0_3
.LBB0_8:
lea rax, [rsi + 4*r8]
cmp rax, rdi
seta r14b
lea rbp, [rdi + 4*r8]
cmp rbp, rsi
seta r15b
lea rax, [rdx + 4*r8]
cmp rax, rdi
seta al
lea rbx, [rcx + 4*r8]
cmp rbp, rdx
seta r11b
cmp rbx, rdi
seta r9b
cmp rbp, rcx
seta bpl
xor r10d, r10d
test r14b, r15b
jne .LBB0_3
and al, r11b
jne .LBB0_3
and r9b, bpl
jne .LBB0_3
mov r10, r8
and r10, -32
xor eax, eax
.LBB0_12: # =>This Inner Loop Header: Depth=1
vmovdqu ymm0, ymmword ptr [rdx + 4*rax]
vpmulld ymm0, ymm0, ymmword ptr [rsi + 4*rax]
vmovdqu ymm1, ymmword ptr [rdx + 4*rax + 32]
vpmulld ymm1, ymm1, ymmword ptr [rsi + 4*rax + 32]
vmovdqu ymm2, ymmword ptr [rdx + 4*rax + 64]
vpmulld ymm2, ymm2, ymmword ptr [rsi + 4*rax + 64]
vmovdqu ymm3, ymmword ptr [rdx + 4*rax + 96]
vpmulld ymm3, ymm3, ymmword ptr [rsi + 4*rax + 96]
vpmulld ymm0, ymm0, ymmword ptr [rcx + 4*rax]
vpmulld ymm1, ymm1, ymmword ptr [rcx + 4*rax + 32]
vpmulld ymm2, ymm2, ymmword ptr [rcx + 4*rax + 64]
vpmulld ymm3, ymm3, ymmword ptr [rcx + 4*rax + 96]
vpaddd ymm0, ymm0, ymmword ptr [rdi + 4*rax]
vpaddd ymm1, ymm1, ymmword ptr [rdi + 4*rax + 32]
vpaddd ymm2, ymm2, ymmword ptr [rdi + 4*rax + 64]
vpaddd ymm3, ymm3, ymmword ptr [rdi + 4*rax + 96]
vmovdqu ymmword ptr [rdi + 4*rax], ymm0
vmovdqu ymmword ptr [rdi + 4*rax + 32], ymm1
vmovdqu ymmword ptr [rdi + 4*rax + 64], ymm2
vmovdqu ymmword ptr [rdi + 4*rax + 96], ymm3
add rax, 32
cmp r10, rax
jne .LBB0_12
cmp r10, r8
je .LBB0_14
.LBB0_3:
mov r9, r10
not r9
add r9, r8
mov rax, r8
and rax, 3
je .LBB0_6
neg rax
.LBB0_5: # =>This Inner Loop Header: Depth=1
mov ebx, dword ptr [rdx + 4*r10]
imul ebx, dword ptr [rsi + 4*r10]
imul ebx, dword ptr [rcx + 4*r10]
add dword ptr [rdi + 4*r10], ebx
add r10, 1
add rax, 1
jne .LBB0_5
.LBB0_6:
cmp r9, 3
jb .LBB0_14
.LBB0_7: # =>This Inner Loop Header: Depth=1
mov eax, dword ptr [rdx + 4*r10]
imul eax, dword ptr [rsi + 4*r10]
imul eax, dword ptr [rcx + 4*r10]
add dword ptr [rdi + 4*r10], eax
mov eax, dword ptr [rdx + 4*r10 + 4]
imul eax, dword ptr [rsi + 4*r10 + 4]
imul eax, dword ptr [rcx + 4*r10 + 4]
add dword ptr [rdi + 4*r10 + 4], eax
mov eax, dword ptr [rdx + 4*r10 + 8]
imul eax, dword ptr [rsi + 4*r10 + 8]
imul eax, dword ptr [rcx + 4*r10 + 8]
add dword ptr [rdi + 4*r10 + 8], eax
mov eax, dword ptr [rdx + 4*r10 + 12]
imul eax, dword ptr [rsi + 4*r10 + 12]
imul eax, dword ptr [rcx + 4*r10 + 12]
add dword ptr [rdi + 4*r10 + 12], eax
add r10, 4
cmp r8, r10
jne .LBB0_7
.LBB0_14:
pop rbx
pop r14
pop r15
pop rbp
vzeroupper
ret
do_compute(int*, int*, int*, int*, unsigned long, int): # @do_compute(int*, int*, int*, int*, unsigned long, int)
push rbp
push r15
push r14
push rbx
test r8, r8
je .LBB1_24
cmp r8, 7
ja .LBB1_13
xor eax, eax
mov rbx, rax
not rbx
test r8b, 1
jne .LBB1_4
jmp .LBB1_7
.LBB1_13:
lea rax, [rsi + 4*r8]
cmp rax, rdi
seta r14b
lea rax, [rdi + 4*r8]
cmp rax, rsi
seta r15b
lea rbp, [rdx + 4*r8]
cmp rbp, rdi
seta bl
lea rbp, [rcx + 4*r8]
cmp rax, rdx
seta r11b
cmp rbp, rdi
seta r10b
cmp rax, rcx
seta bpl
xor eax, eax
test r14b, r15b
jne .LBB1_3
and bl, r11b
jne .LBB1_3
and r10b, bpl
jne .LBB1_3
mov rax, r8
and rax, -8
vmovd xmm0, r9d
vpbroadcastd ymm0, xmm0
lea rbp, [rax - 8]
mov rbx, rbp
shr rbx, 3
add rbx, 1
mov r10d, ebx
and r10d, 3
cmp rbp, 24
jae .LBB1_18
xor r11d, r11d
test r10, r10
jne .LBB1_21
jmp .LBB1_23
.LBB1_18:
mov ebp, 1
sub rbp, rbx
lea r14, [r10 + rbp]
add r14, -1
xor ebx, ebx
xor r11d, r11d
.LBB1_19: # =>This Inner Loop Header: Depth=1
vmovdqu ymm1, ymmword ptr [rsi + rbx]
vpcmpgtd ymm2, ymm1, ymm0
vpmaskmovd ymm3, ymm2, ymmword ptr [rdi + rbx]
vpmaskmovd ymm4, ymm2, ymmword ptr [rdx + rbx]
vpmulld ymm1, ymm4, ymm1
vpmaskmovd ymm4, ymm2, ymmword ptr [rcx + rbx]
vpmulld ymm1, ymm1, ymm4
vpaddd ymm1, ymm1, ymm3
vpmaskmovd ymmword ptr [rdi + rbx], ymm2, ymm1
vmovdqu ymm1, ymmword ptr [rsi + rbx + 32]
vpcmpgtd ymm2, ymm1, ymm0
vpmaskmovd ymm3, ymm2, ymmword ptr [rdi + rbx + 32]
vpmaskmovd ymm4, ymm2, ymmword ptr [rdx + rbx + 32]
vpmulld ymm1, ymm4, ymm1
vpmaskmovd ymm4, ymm2, ymmword ptr [rcx + rbx + 32]
vpmulld ymm1, ymm1, ymm4
vpaddd ymm1, ymm1, ymm3
vpmaskmovd ymmword ptr [rdi + rbx + 32], ymm2, ymm1
vmovdqu ymm1, ymmword ptr [rsi + rbx + 64]
vpcmpgtd ymm2, ymm1, ymm0
vpmaskmovd ymm3, ymm2, ymmword ptr [rdi + rbx + 64]
vpmaskmovd ymm4, ymm2, ymmword ptr [rdx + rbx + 64]
vpmulld ymm1, ymm4, ymm1
vpmaskmovd ymm4, ymm2, ymmword ptr [rcx + rbx + 64]
vpmulld ymm1, ymm1, ymm4
vpaddd ymm1, ymm1, ymm3
vpmaskmovd ymmword ptr [rdi + rbx + 64], ymm2, ymm1
vmovdqu ymm1, ymmword ptr [rsi + rbx + 96]
vpcmpgtd ymm2, ymm1, ymm0
vpmaskmovd ymm3, ymm2, ymmword ptr [rdi + rbx + 96]
vpmaskmovd ymm4, ymm2, ymmword ptr [rdx + rbx + 96]
vpmulld ymm1, ymm4, ymm1
vpmaskmovd ymm4, ymm2, ymmword ptr [rcx + rbx + 96]
vpmulld ymm1, ymm1, ymm4
vpaddd ymm1, ymm1, ymm3
vpmaskmovd ymmword ptr [rdi + rbx + 96], ymm2, ymm1
add r11, 32
sub rbx, -128
add r14, 4
jne .LBB1_19
test r10, r10
je .LBB1_23
.LBB1_21:
lea r14, [rcx + 4*r11]
lea r15, [rdx + 4*r11]
lea rbx, [rdi + 4*r11]
lea r11, [rsi + 4*r11]
neg r10
.LBB1_22: # =>This Inner Loop Header: Depth=1
vmovdqu ymm1, ymmword ptr [r11]
vpcmpgtd ymm2, ymm1, ymm0
vpmaskmovd ymm3, ymm2, ymmword ptr [rbx]
vpmaskmovd ymm4, ymm2, ymmword ptr [r15]
vpmulld ymm1, ymm4, ymm1
vpmaskmovd ymm4, ymm2, ymmword ptr [r14]
vpmulld ymm1, ymm1, ymm4
vpaddd ymm1, ymm1, ymm3
vpmaskmovd ymmword ptr [rbx], ymm2, ymm1
add r14, 32
add r15, 32
add rbx, 32
add r11, 32
add r10, 1
jne .LBB1_22
.LBB1_23:
cmp rax, r8
je .LBB1_24
.LBB1_3:
mov rbx, rax
not rbx
test r8b, 1
je .LBB1_7
.LBB1_4:
mov ebp, dword ptr [rsi + 4*rax]
cmp ebp, r9d
jle .LBB1_6
imul ebp, dword ptr [rdx + 4*rax]
imul ebp, dword ptr [rcx + 4*rax]
add dword ptr [rdi + 4*rax], ebp
.LBB1_6:
or rax, 1
.LBB1_7:
add rbx, r8
je .LBB1_24
.LBB1_8: # =>This Inner Loop Header: Depth=1
mov ebp, dword ptr [rsi + 4*rax]
cmp ebp, r9d
jg .LBB1_9
mov ebp, dword ptr [rsi + 4*rax + 4]
cmp ebp, r9d
jg .LBB1_11
.LBB1_12: # in Loop: Header=BB1_8 Depth=1
add rax, 2
cmp r8, rax
jne .LBB1_8
jmp .LBB1_24
.LBB1_9: # in Loop: Header=BB1_8 Depth=1
imul ebp, dword ptr [rdx + 4*rax]
imul ebp, dword ptr [rcx + 4*rax]
add dword ptr [rdi + 4*rax], ebp
mov ebp, dword ptr [rsi + 4*rax + 4]
cmp ebp, r9d
jle .LBB1_12
.LBB1_11: # in Loop: Header=BB1_8 Depth=1
imul ebp, dword ptr [rdx + 4*rax + 4]
imul ebp, dword ptr [rcx + 4*rax + 4]
add dword ptr [rdi + 4*rax + 4], ebp
add rax, 2
cmp r8, rax
jne .LBB1_8
.LBB1_24:
pop rbx
pop r14
pop r15
pop rbp
vzeroupper
ret
*/
import java.util.Arrays;
public class TestSIMD {
public static void doCompute(int[] a, int[] x, int[] y, int[] z) {
for (int i = 0; i < a.length; i++) {
a[i] = a[i] + x[i] * y[i] * z[i];
}
}
public static void doComputeConditional(int[] a, int[] x, int[] y, int[] z, int threshold) {
for (int i = 0; i < a.length; i++) {
if (x[i] > threshold) {
a[i] = a[i] + x[i] * y[i] * z[i];
}
}
}
public static void main(String[] args) throws Exception {
int length = 4096;
int[] x = new int[length]; Arrays.fill(x, 1);
int[] y = new int[length]; Arrays.fill(y, 2);
int[] z = new int[length]; Arrays.fill(z, 3);
int[] a = new int[length];
for (int i = 0; i < 100; i++) {
doCompute(a, x, y, z);
doComputeConditional(a, x, y, z, 0);
}
System.out.println("done");
System.in.read();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment