blob: 6df4b2bb01796ac5b0f7ca8a118dccaa75dee2f7 [file] [log] [blame]
Jonas Paulssonb0e8a2e2017-09-21 13:52:24 +00001# RUN: llc -mtriple=s390x-linux-gnu -mcpu=z10 -no-integrated-as -start-after=block-placement %s -o - | FileCheck %s
2# Test that LTEBR is used without an unnecessary LER
3
4--- |
5 define float @f15(float %val, float %dummy, float* %dest) {
6 entry:
7 call void asm sideeffect "blah $0", "{f2}"(float %val)
8 %cmp = fcmp olt float %val, 0.000000e+00
9 br i1 %cmp, label %exit, label %store
10
11 store: ; preds = %entry
12 store float %val, float* %dest
13 br label %exit
14
15 exit: ; preds = %store, %entry
16 ret float %val
17 }
18
19...
20
21# CHECK: ltebr %f2, %f0
22
23---
24name: f15
25tracksRegLiveness: true
26liveins:
Puyan Lotfi43e94b12018-01-31 22:04:26 +000027 - { reg: '$f0s', virtual-reg: '' }
28 - { reg: '$r2d', virtual-reg: '' }
Jonas Paulssonb0e8a2e2017-09-21 13:52:24 +000029body: |
30 bb.0.entry:
Puyan Lotfi43e94b12018-01-31 22:04:26 +000031 liveins: $f0s, $r2d
Jonas Paulssonb0e8a2e2017-09-21 13:52:24 +000032
Puyan Lotfi43e94b12018-01-31 22:04:26 +000033 LTEBRCompare $f0s, $f0s, implicit-def $cc
34 $f2s = LER $f0s
35 INLINEASM &"blah $0", 1, 9, $f2s
36 CondReturn 15, 4, implicit $f0s, implicit $cc
Jonas Paulssonb0e8a2e2017-09-21 13:52:24 +000037
38 bb.1.store:
Puyan Lotfi43e94b12018-01-31 22:04:26 +000039 liveins: $f0s, $r2d
Jonas Paulssonb0e8a2e2017-09-21 13:52:24 +000040
Puyan Lotfi43e94b12018-01-31 22:04:26 +000041 STE $f0s, killed $r2d, 0, $noreg :: (store 4 into %ir.dest)
42 Return implicit $f0s
Jonas Paulssonb0e8a2e2017-09-21 13:52:24 +000043
44...