diff options
Diffstat (limited to 'test/CodeGen/AArch64/GlobalISel/irtranslator-volatile-load-pr36018.ll')
-rw-r--r-- | test/CodeGen/AArch64/GlobalISel/irtranslator-volatile-load-pr36018.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/GlobalISel/irtranslator-volatile-load-pr36018.ll b/test/CodeGen/AArch64/GlobalISel/irtranslator-volatile-load-pr36018.ll new file mode 100644 index 0000000000000..9bda39c9fca7f --- /dev/null +++ b/test/CodeGen/AArch64/GlobalISel/irtranslator-volatile-load-pr36018.ll @@ -0,0 +1,14 @@ +; 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 +} |