1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2 # RUN: llc -mtriple=i386-unknown-linux-gnu -mattr=slow-3ops-lea -run-pass x86-fixup-LEAs -o - %s | FileCheck %s
5 define i32 @square(i32 %0) local_unnamed_addr {
6 %blub = getelementptr i8, ptr blockaddress(@square, %2), i32 %0
7 indirectbr ptr %blub, [label %2]
16 ; CHECK-LABEL: name: square
18 ; CHECK-NEXT: renamable $eax = LEA32r renamable $ebx, 1, renamable $ebp, 0, $noreg
19 ; CHECK-NEXT: $eax = ADD32ri $eax, target-flags(x86-gotoff) blockaddress(@square, %ir-block.1), implicit-def $eflags
20 ; CHECK-NEXT: JMP32r killed renamable $eax
22 ; CHECK-NEXT: bb.1 (%ir-block.1, ir-block-address-taken %ir-block.1):
25 renamable $eax = LEA32r renamable $ebp, 1, renamable $ebx, target-flags(x86-gotoff) blockaddress(@square, %ir-block.1), $noreg
26 JMP32r killed renamable $eax
28 bb.1 (%ir-block.1, ir-block-address-taken %ir-block.1):