From 418103c4d4857f85934c34b087576542bad90450 Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Tue, 2 Sep 2014 22:46:18 +0000 Subject: [PATCH] Missing test from r216989 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216990 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/ARM/pr18364-movw.ll | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 test/CodeGen/ARM/pr18364-movw.ll diff --git a/test/CodeGen/ARM/pr18364-movw.ll b/test/CodeGen/ARM/pr18364-movw.ll new file mode 100644 index 00000000000..fdcf15485f1 --- /dev/null +++ b/test/CodeGen/ARM/pr18364-movw.ll @@ -0,0 +1,34 @@ +; RUN: llc < %s -mtriple=armv5te | FileCheck %s --check-prefix=V5 +; RUN: llc < %s -mtriple=armv6 | FileCheck %s --check-prefix=V6 +; RUN: llc < %s -mtriple=armv6t2 | FileCheck %s --check-prefix=V6T2 +; RUN: llc < %s -mtriple=armv7 | FileCheck %s --check-prefix=V7 +; PR18364 + +define i64 @f() #0 { +entry: +; V5-NOT: movw +; V6-NOT: movw +; V6T2: movw +; V7: movw + %y = alloca i64, align 8 + %z = alloca i64, align 8 + store i64 1, i64* %y, align 8 + store i64 11579764786944, i64* %z, align 8 + %0 = load i64* %y, align 8 + %1 = load i64* %z, align 8 + %sub = sub i64 %0, %1 + ret i64 %sub +} + +define i64 @g(i64 %a, i32 %b) #0 { +entry: +; V5-NOT: movw +; V6-NOT: movw +; V6T2: movw +; V7: movw + %0 = mul i64 %a, 86400000 + %mul = add i64 %0, -210866803200000 + %conv = sext i32 %b to i64 + %add = add nsw i64 %mul, %conv + ret i64 %add +} -- 2.40.0