brintos

brintos / llvm-project-archived public Read only

0
0
Text · 840 B · 5fdc63b Raw
44 lines · python
1# Test that inline assembly get the right size value so that a branch across2# a block containing them gets relaxed.3 4# RUN: %python %s | llc -mtriple=s390x-linux-gnu -mcpu=z196 -enable-post-misched=false \5# RUN:    | FileCheck %s6 7# Construct:8#9# entry:10#   branch to block11#12# block:13#   sequence of call asm14#   unconditional branch to block15#16# exit:17#   ret void18 19# CHECK-LABEL: f120# CHECK: jg21# CHECK-NEXT: .Lfunc_end0:22 23from __future__ import print_function24 25num = 1100026 27print("define void @f1() {")28print("entry:")29print("  br label %block")30print("")31print("block:")32 33for i in range(num):34    print(35        '  tail call i64 asm "lang\\09$0,$2,$1\\0A", "=d,=*Q,d,*Q"(i32* elementtype(i32) undef, i32 undef, i32* elementtype(i32) undef)'36    )37 38print("  br label %block")39 40print("")41print("exit:")42print("  ret void")43print("}")44