| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -verify-machineinstrs | FileCheck --check-prefix=LE %s |
| ; RUN: llc < %s -mtriple=aarch64_be-none-linux-gnu -verify-machineinstrs | FileCheck --check-prefix=BE %s |
| |
| ; Check for the crash in https://github.com/llvm/llvm-project/issues/173483 |
| define void @f(<2 x i8> %1) { |
| ; LE-LABEL: f: |
| ; LE: // %bb.0: |
| ; LE-NEXT: sub sp, sp, #16 |
| ; LE-NEXT: .cfi_def_cfa_offset 16 |
| ; LE-NEXT: // kill: def $d0 killed $d0 def $q0 |
| ; LE-NEXT: mov s1, v0.s[1] |
| ; LE-NEXT: str b0, [sp, #12] |
| ; LE-NEXT: stur b1, [sp, #13] |
| ; LE-NEXT: ldrh w8, [sp, #12] |
| ; LE-NEXT: fmov s0, w8 |
| ; LE-NEXT: //APP |
| ; LE-NEXT: //NO_APP |
| ; LE-NEXT: add sp, sp, #16 |
| ; LE-NEXT: ret |
| ; |
| ; BE-LABEL: f: |
| ; BE: // %bb.0: |
| ; BE-NEXT: sub sp, sp, #16 |
| ; BE-NEXT: .cfi_def_cfa_offset 16 |
| ; BE-NEXT: rev64 v0.2s, v0.2s |
| ; BE-NEXT: mov s1, v0.s[1] |
| ; BE-NEXT: str b0, [sp, #12] |
| ; BE-NEXT: stur b1, [sp, #13] |
| ; BE-NEXT: ldrh w8, [sp, #12] |
| ; BE-NEXT: fmov s0, w8 |
| ; BE-NEXT: //APP |
| ; BE-NEXT: //NO_APP |
| ; BE-NEXT: add sp, sp, #16 |
| ; BE-NEXT: ret |
| call void asm sideeffect "", "w"(<2 x i8> %1) |
| ret void |
| } |