File: fneg-fold-legalize-dag-increase-insts.ll

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (24 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -enable-no-signed-zeros-fp-math=true < %s | FileCheck %s
; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -enable-no-signed-zeros-fp-math=false < %s | FileCheck %s

; no-signed-zeros-fp-math should not increase the number of
; instructions emitted.

define { double, double } @testfn(double %arg, double %arg1, double %arg2) {
; CHECK-LABEL: testfn:
; CHECK:       ; %bb.0: ; %bb
; CHECK-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; CHECK-NEXT:    v_add_f64 v[4:5], v[4:5], -v[0:1]
; CHECK-NEXT:    v_add_f64 v[0:1], v[4:5], -v[2:3]
; CHECK-NEXT:    v_add_f64 v[2:3], -v[2:3], -v[4:5]
; CHECK-NEXT:    s_setpc_b64 s[30:31]
bb:
  %tmp = fsub fast double 0.000000e+00, %arg1
  %tmp3 = fsub fast double %arg2, %arg
  %tmp4 = fadd fast double %tmp3, %tmp
  %tmp5 = fsub fast double %tmp, %tmp3
  %tmp6 = insertvalue { double, double } undef, double %tmp4, 0
  %tmp7 = insertvalue { double, double } %tmp6, double %tmp5, 1
  ret { double, double } %tmp7
}