# RUN: llc %s -mattr=+fix-tn0013 -march=sparc -run-pass=errata-workaround -o - \
# RUN: | FileCheck %s
---
# CHECK: $f0 = FSQRTS $f0
# CHECK-NEXT: NOP
# CHECK-NEXT: NOP
# CHECK-NEXT: $f3 = FADDS $f1, $f2
# CHECK-NEXT: $f3 = FADDS $f1, $f2
# CHECK-NEXT: $f0 = FDIVS $f4, $f5
name: er-8-1
body: |
bb.0.entry:
$f0 = FSQRTS $f0
$f3 = FADDS $f1, $f2
$f3 = FADDS $f1, $f2
$f0 = FDIVS $f4, $f5
---
# CHECK: $f0 = FDIVS $f0, $f0
# CHECK-NEXT: NOP
# CHECK-NEXT: $f3 = FADDS $f1, $f2
# CHECK-NEXT: $f3 = FADDS $f1, $f2
# CHECK-NEXT: $f3 = FADDS $f1, $f2
# CHECK-NEXT: $f0 = FSQRTS $f4
name: er-8-2
body: |
bb.0.entry:
$f0 = FDIVS $f0, $f0
$f3 = FADDS $f1, $f2
$f3 = FADDS $f1, $f2
$f3 = FADDS $f1, $f2
$f0 = FSQRTS $f4
---
# CHECK-NOT: NOP
name: er-9
body: |
bb.0.entry:
$f0 = FSQRTS $f0
$f3 = FADDS $f1, $f2
$f3 = FADDS $f0, $f2
$f3 = FADDS $f1, $f2
$f0 = FSQRTS $f0
---
# CHECK-NOT: NOP
name: er-10
body: |
bb.0.entry:
$f0 = FSQRTS $f0
$f4 = FSQRTS $f4
$f3 = FADDS $f1, $f2
$f0 = FSQRTS $f0
---
# CHECK: er-11
# CHECK: $f0 = FSQRTS $f0
# CHECK-NEXT: NOP
# CHECK: $f0 = FDIVS $f0, $f0
# CHECK-NEXT: NOP
name: er-11
body: |
bb.0.entry:
successors: %bb.3, %bb.1
$f0 = FSQRTS $f0
FBCOND %bb.3, 22, implicit $fcc0 {
NOP
}
bb.1:
successors: %bb.3, %bb.4
$f0 = FDIVS $f0, $f0
BCOND %bb.4, 10, implicit $icc {
NOP
}
bb.3:
NOP
bb.4:
NOP
---
# CHECK: $f1 = FDIVS $f0, $f1
# CHECK-NEXT: NOP
# CHECK-NEXT: STri $i6, -84, $i2
name: er-8-3
body: |
bb.0.entry:
$f1 = FDIVS $f0, $f1
STri $i6, -84, $i2
$f0 = LDFri $i6, -84
$f0 = FITOS $f0
$f5 = FDIVS $f4, $f0
...