From 0cc11108ba2d2429ca777edd251aa38d57eff2f6 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 24 Nov 2023 14:15:06 -0800 Subject: [PATCH] InstcountCI: Update for changed codegen. --- .../InstructionCountCI/FlagM/Primary.json | 38 +++++++++---------- .../InstructionCountCI/FlagM/Secondary.json | 14 +++---- unittests/InstructionCountCI/Primary.json | 38 +++++++++---------- unittests/InstructionCountCI/Secondary.json | 14 +++---- 4 files changed, 48 insertions(+), 56 deletions(-) diff --git a/unittests/InstructionCountCI/FlagM/Primary.json b/unittests/InstructionCountCI/FlagM/Primary.json index 14f7cc831..838379305 100644 --- a/unittests/InstructionCountCI/FlagM/Primary.json +++ b/unittests/InstructionCountCI/FlagM/Primary.json @@ -1857,15 +1857,14 @@ ] }, "imul eax, ebx, 257": { - "ExpectedInstructionCount": 8, + "ExpectedInstructionCount": 7, "Comment": "0x69", "ExpectedArm64ASM": [ - "sxtw x20, w7", - "mov w21, #0x101", - "mul x20, x20, x21", - "asr x21, x20, #32", - "mov w4, w20", - "sbfx x20, x20, #31, #1", + "mov w20, #0x101", + "mul x21, x7, x20", + "asr x21, x21, #32", + "mul w4, w7, w20", + "sbfx x20, x4, #31, #1", "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] @@ -1875,10 +1874,10 @@ "Comment": "0x69", "ExpectedArm64ASM": [ "mov w20, #0x101", + "smulh x21, x7, x20", "mul x4, x7, x20", - "smulh x20, x7, x20", - "asr x21, x4, #63", - "cmp x20, x21", + "asr x20, x4, #63", + "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] }, @@ -1897,15 +1896,14 @@ ] }, "imul eax, ebx, 3": { - "ExpectedInstructionCount": 8, + "ExpectedInstructionCount": 7, "Comment": "0x6b", "ExpectedArm64ASM": [ - "sxtw x20, w7", - "mov w21, #0x3", - "mul x20, x20, x21", - "asr x21, x20, #32", - "mov w4, w20", - "sbfx x20, x20, #31, #1", + "mov w20, #0x3", + "mul x21, x7, x20", + "asr x21, x21, #32", + "mul w4, w7, w20", + "sbfx x20, x4, #31, #1", "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] @@ -1915,10 +1913,10 @@ "Comment": "0x6b", "ExpectedArm64ASM": [ "mov w20, #0x3", + "smulh x21, x7, x20", "mul x4, x7, x20", - "smulh x20, x7, x20", - "asr x21, x4, #63", - "cmp x20, x21", + "asr x20, x4, #63", + "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] }, diff --git a/unittests/InstructionCountCI/FlagM/Secondary.json b/unittests/InstructionCountCI/FlagM/Secondary.json index 23ac8b09a..d16578f88 100644 --- a/unittests/InstructionCountCI/FlagM/Secondary.json +++ b/unittests/InstructionCountCI/FlagM/Secondary.json @@ -1033,16 +1033,14 @@ ] }, "imul eax, ebx": { - "ExpectedInstructionCount": 8, + "ExpectedInstructionCount": 6, "Comment": "0x0f 0xaf", "ExpectedArm64ASM": [ - "sxtw x20, w4", - "sxtw x21, w7", - "mul x20, x20, x21", - "asr x21, x20, #32", - "mov w4, w20", - "sbfx x20, x20, #31, #1", - "cmp x21, x20", + "mul x20, x4, x7", + "asr x20, x20, #32", + "mul w4, w4, w7", + "sbfx x21, x4, #31, #1", + "cmp x20, x21", "ccmn xzr, #0, #nzCV, eq" ] }, diff --git a/unittests/InstructionCountCI/Primary.json b/unittests/InstructionCountCI/Primary.json index d40cd13c3..6235801b2 100644 --- a/unittests/InstructionCountCI/Primary.json +++ b/unittests/InstructionCountCI/Primary.json @@ -2087,15 +2087,14 @@ ] }, "imul eax, ebx, 257": { - "ExpectedInstructionCount": 8, + "ExpectedInstructionCount": 7, "Comment": "0x69", "ExpectedArm64ASM": [ - "sxtw x20, w7", - "mov w21, #0x101", - "mul x20, x20, x21", - "asr x21, x20, #32", - "mov w4, w20", - "sbfx x20, x20, #31, #1", + "mov w20, #0x101", + "mul x21, x7, x20", + "asr x21, x21, #32", + "mul w4, w7, w20", + "sbfx x20, x4, #31, #1", "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] @@ -2105,10 +2104,10 @@ "Comment": "0x69", "ExpectedArm64ASM": [ "mov w20, #0x101", + "smulh x21, x7, x20", "mul x4, x7, x20", - "smulh x20, x7, x20", - "asr x21, x4, #63", - "cmp x20, x21", + "asr x20, x4, #63", + "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] }, @@ -2151,15 +2150,14 @@ ] }, "imul eax, ebx, 3": { - "ExpectedInstructionCount": 8, + "ExpectedInstructionCount": 7, "Comment": "0x6b", "ExpectedArm64ASM": [ - "sxtw x20, w7", - "mov w21, #0x3", - "mul x20, x20, x21", - "asr x21, x20, #32", - "mov w4, w20", - "sbfx x20, x20, #31, #1", + "mov w20, #0x3", + "mul x21, x7, x20", + "asr x21, x21, #32", + "mul w4, w7, w20", + "sbfx x20, x4, #31, #1", "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] @@ -2169,10 +2167,10 @@ "Comment": "0x6b", "ExpectedArm64ASM": [ "mov w20, #0x3", + "smulh x21, x7, x20", "mul x4, x7, x20", - "smulh x20, x7, x20", - "asr x21, x4, #63", - "cmp x20, x21", + "asr x20, x4, #63", + "cmp x21, x20", "ccmn xzr, #0, #nzCV, eq" ] }, diff --git a/unittests/InstructionCountCI/Secondary.json b/unittests/InstructionCountCI/Secondary.json index c07a67c92..ada24c725 100644 --- a/unittests/InstructionCountCI/Secondary.json +++ b/unittests/InstructionCountCI/Secondary.json @@ -1879,16 +1879,14 @@ ] }, "imul eax, ebx": { - "ExpectedInstructionCount": 8, + "ExpectedInstructionCount": 6, "Comment": "0x0f 0xaf", "ExpectedArm64ASM": [ - "sxtw x20, w4", - "sxtw x21, w7", - "mul x20, x20, x21", - "asr x21, x20, #32", - "mov w4, w20", - "sbfx x20, x20, #31, #1", - "cmp x21, x20", + "mul x20, x4, x7", + "asr x20, x20, #32", + "mul w4, w4, w7", + "sbfx x21, x4, #31, #1", + "cmp x20, x21", "ccmn xzr, #0, #nzCV, eq" ] },