~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/Hexagon/float.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -march=hexagon -mcpu=hexagonv4 < %s | FileCheck %s
 
2
; CHECK: __hexagon_addsf3
 
3
; CHECK: __hexagon_subsf3
 
4
 
 
5
define void @foo(float* %acc, float %num, float %num2) nounwind {
 
6
entry:
 
7
  %acc.addr = alloca float*, align 4
 
8
  %num.addr = alloca float, align 4
 
9
  %num2.addr = alloca float, align 4
 
10
  store float* %acc, float** %acc.addr, align 4
 
11
  store float %num, float* %num.addr, align 4
 
12
  store float %num2, float* %num2.addr, align 4
 
13
  %0 = load float*, float** %acc.addr, align 4
 
14
  %1 = load float, float* %0
 
15
  %2 = load float, float* %num.addr, align 4
 
16
  %add = fadd float %1, %2
 
17
  %3 = load float, float* %num2.addr, align 4
 
18
  %sub = fsub float %add, %3
 
19
  %4 = load float*, float** %acc.addr, align 4
 
20
  store float %sub, float* %4
 
21
  ret void
 
22
}