summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-04 18:19:52 +0000
committerReid Kleckner <rnk@google.com>2017-05-04 18:19:52 +0000
commit6d2ea6ec809d7c648c7b31ae195753b5507e7169 (patch)
tree7fb28c065501b35cd7d0baa425b0e0aa9baa8c1c /clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
parent142cb83768ffd781a1edb21c072120fc34dc7fa0 (diff)
downloadbcm5719-llvm-6d2ea6ec809d7c648c7b31ae195753b5507e7169.tar.gz
bcm5719-llvm-6d2ea6ec809d7c648c7b31ae195753b5507e7169.zip
[ms-inline-asm] Use the frontend size only for ambiguous instructions
This avoids problems on code like this: char buf[16]; __asm { movups xmm0, [buf] mov [buf], eax } The frontend size in this case (1) is wrong, and the register makes the instruction matching unambiguous. There are also enough bytes available that we shouldn't complain to the user that they are potentially using an incorrectly sized instruction to access the variable. Supersedes D32636 and D26586 and fixes PR28266 llvm-svn: 302179
Diffstat (limited to 'clang/test/CodeGenCXX/ms-inline-asm-fields.cpp')
-rw-r--r--clang/test/CodeGenCXX/ms-inline-asm-fields.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp b/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
index 6f329330bda..5ee6acf5746 100644
--- a/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
+++ b/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
@@ -17,14 +17,14 @@ A a_global;
extern "C" int test_param_field(A p) {
// CHECK: define i32 @test_param_field(%struct.A* byval align 4 %p)
// CHECK: getelementptr inbounds %struct.A, %struct.A* %p, i32 0, i32 0
-// CHECK: call i32 asm sideeffect inteldialect "mov eax, dword ptr $1"
+// CHECK: call i32 asm sideeffect inteldialect "mov eax, $1"
// CHECK: ret i32
__asm mov eax, p.a1
}
extern "C" int test_namespace_global() {
// CHECK: define i32 @test_namespace_global()
-// CHECK: call i32 asm sideeffect inteldialect "mov eax, dword ptr $1", "{{.*}}"(i32* getelementptr inbounds (%struct.A, %struct.A* @_ZN4asdf8a_globalE, i32 0, i32 2, i32 1))
+// CHECK: call i32 asm sideeffect inteldialect "mov eax, $1", "{{.*}}"(i32* getelementptr inbounds (%struct.A, %struct.A* @_ZN4asdf8a_globalE, i32 0, i32 2, i32 1))
// CHECK: ret i32
__asm mov eax, asdf::a_global.a3.b2
}
OpenPOWER on IntegriCloud