linux-packaging-mono/external/llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-volatile-load-pr36018.ll
Xamarin Public Jenkins (auto-signing) 64ac736ec5 Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
2019-04-12 14:10:50 +00:00

15 lines
342 B
LLVM

; RUN: llc -O0 -mtriple=aarch64-apple-ios -o - %s | FileCheck %s
@g = global i16 0, align 2
declare void @bar(i32)
; Check that only one load is generated. We fall back to
define hidden void @foo() {
; CHECK-NOT: ldrh
; CHECK: ldrsh
%1 = load volatile i16, i16* @g, align 2
%2 = sext i16 %1 to i32
call void @bar(i32 %2)
ret void
}