diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 |
| commit | 5ca98fd98791947eba83a1ed3f2c8191ef7afa6c (patch) | |
| tree | f5944309621cee4fe0976be6f9ac619b7ebfc4c2 /test/CodeGen/SPARC/spillsize.ll | |
| parent | 68bcb7db193e4bc81430063148253d30a791023e (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/SPARC/spillsize.ll')
| -rw-r--r-- | test/CodeGen/SPARC/spillsize.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/spillsize.ll b/test/CodeGen/SPARC/spillsize.ll new file mode 100644 index 000000000000..64f63f97d509 --- /dev/null +++ b/test/CodeGen/SPARC/spillsize.ll @@ -0,0 +1,25 @@ +; RUN: llc < %s -verify-machineinstrs | FileCheck %s +target datalayout = "E-m:e-i64:64-n32:64-S128" +target triple = "sparcv9" + +; CHECK-LABEL: spill4 +; This function spills two values: %p and the materialized large constant. +; Both must use 8-byte spill and fill instructions. +; CHECK: stx %{{..}}, [%fp+ +; CHECK: stx %{{..}}, [%fp+ +; CHECK: ldx [%fp+ +; CHECK: ldx [%fp+ +define void @spill4(i64* nocapture %p) { +entry: + %val0 = load i64* %p + %cmp0 = icmp ult i64 %val0, 385672958347594845 + %cm80 = zext i1 %cmp0 to i64 + store i64 %cm80, i64* %p, align 8 + tail call void asm sideeffect "", "~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{g2},~{g3},~{g4},~{g5},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o7}"() + %arrayidx1 = getelementptr inbounds i64* %p, i64 1 + %val = load i64* %arrayidx1 + %cmp = icmp ult i64 %val, 385672958347594845 + %cm8 = select i1 %cmp, i64 10, i64 20 + store i64 %cm8, i64* %arrayidx1, align 8 + ret void +} |
