x64: port icmp to ISLE (#3886)

* x64: port GPR-held `icmp` to ISLE
* x64: port equality `icmp` for i128 type
* x64: port `icmp` for vector types
* x64: rename from_intcc to intcc_to_cc
This commit is contained in:
Andrew Brown
2022-03-18 11:22:09 -07:00
committed by GitHub
parent 8cfb552090
commit e92cbfb283
8 changed files with 1145 additions and 549 deletions

View File

@@ -241,20 +241,20 @@ block0(v0: i128, v1: i128):
; Inst 5: movq %r14, 32(%rsp)
; Inst 6: movq %rbx, 40(%rsp)
; Inst 7: movq %r15, 48(%rsp)
; Inst 8: cmpq %rcx, %rsi
; Inst 8: cmpq %rdx, %rdi
; Inst 9: setz %al
; Inst 10: cmpq %rdx, %rdi
; Inst 10: cmpq %rcx, %rsi
; Inst 11: setz %r8b
; Inst 12: andq %rax, %r8
; Inst 13: andq $1, %r8
; Inst 12: andq %r8, %rax
; Inst 13: andq $1, %rax
; Inst 14: setnz %al
; Inst 15: movq %rax, rsp(0 + virtual offset)
; Inst 16: cmpq %rcx, %rsi
; Inst 16: cmpq %rdx, %rdi
; Inst 17: setnz %al
; Inst 18: cmpq %rdx, %rdi
; Inst 18: cmpq %rcx, %rsi
; Inst 19: setnz %r8b
; Inst 20: orq %rax, %r8
; Inst 21: andq $1, %r8
; Inst 20: orq %r8, %rax
; Inst 21: andq $1, %rax
; Inst 22: setnz %r8b
; Inst 23: cmpq %rcx, %rsi
; Inst 24: setl %r9b

View File

@@ -55,14 +55,16 @@ block0(v0: i16x8, v1: i16x8):
; Entry block: 0
; Block 0:
; (original IR block: block0)
; (instruction range: 0 .. 7)
; (instruction range: 0 .. 9)
; Inst 0: pushq %rbp
; Inst 1: movq %rsp, %rbp
; Inst 2: pminsw %xmm1, %xmm0
; Inst 3: pcmpeqw %xmm1, %xmm0
; Inst 4: movq %rbp, %rsp
; Inst 5: popq %rbp
; Inst 6: ret
; Inst 2: movdqa %xmm1, %xmm2
; Inst 3: movdqa %xmm0, %xmm1
; Inst 4: pmaxsw %xmm2, %xmm1
; Inst 5: pcmpeqw %xmm1, %xmm0
; Inst 6: movq %rbp, %rsp
; Inst 7: popq %rbp
; Inst 8: ret
; }}
function %icmp_uge_i8x16(i8x16, i8x16) -> b8x16 {
@@ -75,13 +77,15 @@ block0(v0: i8x16, v1: i8x16):
; Entry block: 0
; Block 0:
; (original IR block: block0)
; (instruction range: 0 .. 7)
; (instruction range: 0 .. 9)
; Inst 0: pushq %rbp
; Inst 1: movq %rsp, %rbp
; Inst 2: pminub %xmm1, %xmm0
; Inst 3: pcmpeqb %xmm1, %xmm0
; Inst 4: movq %rbp, %rsp
; Inst 5: popq %rbp
; Inst 6: ret
; Inst 2: movdqa %xmm1, %xmm2
; Inst 3: movdqa %xmm0, %xmm1
; Inst 4: pmaxub %xmm2, %xmm1
; Inst 5: pcmpeqb %xmm1, %xmm0
; Inst 6: movq %rbp, %rsp
; Inst 7: popq %rbp
; Inst 8: ret
; }}