From c20b46da2f48a76f2c2affb290d8073e9ce2aab4 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sun, 1 Oct 2017 23:53:53 +0000 Subject: [X86] Change register&memory TEST instructions from MRMSrcMem to MRMDstMem Summary: Intel documentation shows the memory operand as the first operand. But we currently treat it as the second operand. Conceptually the order doesn't matter since it doesn't write memory. We have aliases to parse with the operands in either order and the isel matching is commutable. For the register®ister form order does matter for the assembly parser. PR22995 was previously filed and fixed by changing the register®ister form from MRMSrcReg to MRMDestReg to match gas. Ideally the memory form should match by using MRMDestMem. I believe this supercedes D38025 which was trying to switch the register®ister form back to pre-PR22995. Reviewers: aymanmus, RKSimon, zvi Reviewed By: aymanmus Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38120 llvm-svn: 314639 --- llvm/test/CodeGen/X86/testl-commute.ll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/test/CodeGen/X86/testl-commute.ll') diff --git a/llvm/test/CodeGen/X86/testl-commute.ll b/llvm/test/CodeGen/X86/testl-commute.ll index a9a9e581d99..43e095aecd0 100644 --- a/llvm/test/CodeGen/X86/testl-commute.ll +++ b/llvm/test/CodeGen/X86/testl-commute.ll @@ -9,7 +9,7 @@ target triple = "x86_64-apple-darwin7" define i32 @test(i32* %P, i32* %G) nounwind { ; CHECK-LABEL: test: ; CHECK-NOT: ret -; CHECK: testl (%{{.*}}), %{{.*}} +; CHECK: testl %{{.*}}, (%{{.*}}) ; CHECK: ret entry: @@ -30,7 +30,7 @@ bb1: ; preds = %entry define i32 @test2(i32* %P, i32* %G) nounwind { ; CHECK-LABEL: test2: ; CHECK-NOT: ret -; CHECK: testl (%{{.*}}), %{{.*}} +; CHECK: testl %{{.*}}, (%{{.*}}) ; CHECK: ret entry: @@ -51,7 +51,7 @@ bb1: ; preds = %entry define i32 @test3(i32* %P, i32* %G) nounwind { ; CHECK-LABEL: test3: ; CHECK-NOT: ret -; CHECK: testl (%{{.*}}), %{{.*}} +; CHECK: testl %{{.*}}, (%{{.*}}) ; CHECK: ret entry: -- cgit v1.2.3