From 38853c2a9be7c0c22035ff720e3b402ec8ffa129 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 22 Aug 2023 21:46:03 -0700 Subject: [PATCH] InstCountCI: Update for vmovd/vmovq optimization --- unittests/InstructionCountCI/Secondary.json | 21 ++++++-------- .../InstructionCountCI/Secondary_OpSize.json | 28 ++++++++----------- unittests/InstructionCountCI/VEX_map1.json | 11 +++----- 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/unittests/InstructionCountCI/Secondary.json b/unittests/InstructionCountCI/Secondary.json index b4ad02751..bb395a06a 100644 --- a/unittests/InstructionCountCI/Secondary.json +++ b/unittests/InstructionCountCI/Secondary.json @@ -1392,22 +1392,20 @@ ] }, "movd mm0, eax": { - "ExpectedInstructionCount": 3, - "Optimal": "No", + "ExpectedInstructionCount": 2, + "Optimal": "Yes", "Comment": "0x0f 0x6e", "ExpectedArm64ASM": [ - "ubfx x20, x4, #0, #32", - "fmov s4, w20", + "fmov s4, w4", "str d4, [x28, #752]" ] }, "movd mm0, [rax]": { - "ExpectedInstructionCount": 3, - "Optimal": "No", + "ExpectedInstructionCount": 2, + "Optimal": "Yes", "Comment": "0x0f 0x6e", "ExpectedArm64ASM": [ - "ldr w20, [x4]", - "fmov s4, w20", + "ldr s4, [x4]", "str d4, [x28, #752]" ] }, @@ -1592,13 +1590,12 @@ ] }, "movd [rax], mm0": { - "ExpectedInstructionCount": 3, - "Optimal": "No", + "ExpectedInstructionCount": 2, + "Optimal": "Yes", "Comment": "0x0f 0x7e", "ExpectedArm64ASM": [ "ldr d4, [x28, #752]", - "mov w20, v4.s[0]", - "str w20, [x4]" + "str s4, [x4]" ] }, "db 0x0f, 0x7f, 0xc1": { diff --git a/unittests/InstructionCountCI/Secondary_OpSize.json b/unittests/InstructionCountCI/Secondary_OpSize.json index 62598fa54..d03b76b29 100644 --- a/unittests/InstructionCountCI/Secondary_OpSize.json +++ b/unittests/InstructionCountCI/Secondary_OpSize.json @@ -490,21 +490,19 @@ ] }, "movd xmm0, dword [rax]": { - "ExpectedInstructionCount": 2, - "Optimal": "No", + "ExpectedInstructionCount": 1, + "Optimal": "Yes", "Comment": "0x66 0x0f 0x6e", "ExpectedArm64ASM": [ - "ldr w20, [x4]", - "fmov s16, w20" + "ldr s16, [x4]" ] }, "movd xmm0, eax": { - "ExpectedInstructionCount": 2, - "Optimal": "No", + "ExpectedInstructionCount": 1, + "Optimal": "Yes", "Comment": "0x66 0x0f 0x6e", "ExpectedArm64ASM": [ - "ubfx x20, x4, #0, #32", - "fmov s16, w20" + "fmov s16, w4" ] }, "movq xmm0, qword [rax]": { @@ -711,21 +709,19 @@ ] }, "movd dword [rax], xmm0": { - "ExpectedInstructionCount": 2, - "Optimal": "No", + "ExpectedInstructionCount": 1, + "Optimal": "Yes", "Comment": "0x66 0x0f 0x7e", "ExpectedArm64ASM": [ - "mov w20, v16.s[0]", - "str w20, [x4]" + "str s16, [x4]" ] }, "movq qword [rax], xmm0": { - "ExpectedInstructionCount": 2, - "Optimal": "No", + "ExpectedInstructionCount": 1, + "Optimal": "Yes", "Comment": "0x66 0x0f 0x7e", "ExpectedArm64ASM": [ - "mov v4.8b, v16.8b", - "str d4, [x4]" + "str d16, [x4]" ] }, "movdqa [rax], xmm0": { diff --git a/unittests/InstructionCountCI/VEX_map1.json b/unittests/InstructionCountCI/VEX_map1.json index d02cb1ce4..7bde7fbbd 100644 --- a/unittests/InstructionCountCI/VEX_map1.json +++ b/unittests/InstructionCountCI/VEX_map1.json @@ -4797,15 +4797,13 @@ ] }, "vmovd xmm0, dword [rax]": { - "ExpectedInstructionCount": 4, + "ExpectedInstructionCount": 2, "Optimal": "No", "Comment": [ "Map 1 0b01 0x6e 128-bit" ], "ExpectedArm64ASM": [ - "ldr w20, [x4]", - "fmov s4, w20", - "mov v4.16b, v4.16b", + "ldr s4, [x4]", "mov z16.d, p7/m, z4.d" ] }, @@ -5031,7 +5029,7 @@ ] }, "vmovd dword [rax], xmm0": { - "ExpectedInstructionCount": 6, + "ExpectedInstructionCount": 5, "Optimal": "No", "Comment": [ "Map 1 0b01 0x7e 128-bit" @@ -5041,8 +5039,7 @@ "movi v0.2d, #0x0", "mov v0.s[0], v4.s[0]", "mov v4.16b, v0.16b", - "mov w20, v4.s[0]", - "str w20, [x4]" + "str s4, [x4]" ] }, "vmovq qword [rax], xmm0": {