| Tim Northover | 3b0846e | 2014-05-24 12:50:23 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s |
| Tim Northover | e0e3aef | 2013-01-31 12:12:40 +0000 | [diff] [blame] | 2 | declare 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 | |
| 7 | define fp128 @test_folding() { |
| Stephen Lin | f799e3f | 2013-07-13 20:38:47 +0000 | [diff] [blame] | 8 | ; CHECK-LABEL: test_folding: |
| Tim Northover | e0e3aef | 2013-01-31 12:12:40 +0000 | [diff] [blame] | 9 | %l = alloca i32 |
| 10 | store i32 42, i32* %l |
| David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 11 | %val = load i32, i32* %l |
| Tim Northover | e0e3aef | 2013-01-31 12:12:40 +0000 | [diff] [blame] | 12 | %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 Northover | bd66887 | 2014-04-15 14:00:29 +0000 | [diff] [blame] | 15 | ; CHECK: ldr {{q[0-9]+}}, [{{x[0-9]+}}, {{#?}}:lo12:.LCPI |
| Tim Northover | e0e3aef | 2013-01-31 12:12:40 +0000 | [diff] [blame] | 16 | ret fp128 %fpval |
| Stephen Lin | f799e3f | 2013-07-13 20:38:47 +0000 | [diff] [blame] | 17 | } |