blob: 5027e83c292a7e631a48110f5c20d2053d42aa6d [file] [log] [blame]
Tim Northover3b0846e2014-05-24 12:50:23 +00001; RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s
Tim Northovere0e3aef2013-01-31 12:12:40 +00002declare void @bar(i8*, i8*, i32*)
3
4; SelectionDAG used to try to fold some fp128 operations using the ppc128 type,
5; which is not supported.
6
7define fp128 @test_folding() {
Stephen Linf799e3f2013-07-13 20:38:47 +00008; CHECK-LABEL: test_folding:
Tim Northovere0e3aef2013-01-31 12:12:40 +00009 %l = alloca i32
10 store i32 42, i32* %l
David Blaikiea79ac142015-02-27 21:17:42 +000011 %val = load i32, i32* %l
Tim Northovere0e3aef2013-01-31 12:12:40 +000012 %fpval = sitofp i32 %val to fp128
13 ; If the value is loaded from a constant pool into an fp128, it's been folded
14 ; successfully.
Tim Northoverbd668872014-04-15 14:00:29 +000015; CHECK: ldr {{q[0-9]+}}, [{{x[0-9]+}}, {{#?}}:lo12:.LCPI
Tim Northovere0e3aef2013-01-31 12:12:40 +000016 ret fp128 %fpval
Stephen Linf799e3f2013-07-13 20:38:47 +000017}