diff options
| author | Tim Northover <tnorthover@apple.com> | 2016-06-15 20:33:36 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2016-06-15 20:33:36 +0000 |
| commit | 389a1e39ea31e32489da2345bb30cc928fde7c49 (patch) | |
| tree | ed9ddab9594948e60156bd1f283915041394efbb /llvm/test/CodeGen | |
| parent | b82f08fa3d3f10fc479be6acfcdb7c066f744310 (diff) | |
| download | bcm5719-llvm-389a1e39ea31e32489da2345bb30cc928fde7c49.tar.gz bcm5719-llvm-389a1e39ea31e32489da2345bb30cc928fde7c49.zip | |
AArch64: stop trying to use 32-bit MOVZs when expanding patchpoints.
Of course the assembly was right but because the opcode was MOVZWi it was
encoded as "movz w16, #65535, lsl #32" which is an unallocated encoding and
would go horribly wrong on a CPU.
No idea how this bug survived this long. It seems nobody is using that aspect
of patchpoints.
llvm-svn: 272831
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll b/llvm/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll index 5620464631c..fe290629d92 100644 --- a/llvm/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll +++ b/llvm/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll @@ -1,5 +1,12 @@ -; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone < %s | FileCheck %s +; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone < %s | FileCheck %s ; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone -fast-isel < %s | FileCheck %s --check-prefix=FAST +; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone -filetype=obj -o %t %s +; RUN: llvm-objdump -triple arm64-apple-darwin -d %t | FileCheck %s --check-prefix CHECK-ENCODING + +; CHECK-ENCODING-NOT: <unknown> +; CHECK-ENCODING: movz x16, #65535, lsl #32 +; CHECK-ENCODING: movk x16, #57005, lsl #16 +; CHECK-ENCODING: movk x16, #48879 ; One argument will be passed in register, the other will be pushed on the stack. ; Return value in x0. @@ -11,8 +18,8 @@ entry: ; CHECK-NEXT: mov x0, x{{.+}} ; CHECK: Ltmp ; CHECK-NEXT: movz x16, #65535, lsl #32 -; CHECK-NEXT: movk x16, #57005, lsl #16 -; CHECK-NEXT: movk x16, #48879 +; CHECK: movk x16, #57005, lsl #16 +; CHECK: movk x16, #48879 ; CHECK-NEXT: blr x16 ; FAST-LABEL: jscall_patchpoint_codegen: ; FAST: Ltmp |

