65 lines · plain
1# RUN: llc -o - %s -mtriple=x86_64-- -run-pass=x86-avoid-SFB | FileCheck %s2--- |3 ; ModuleID = '../test/CodeGen/X86/avoid-sfb-mir.ll'4 source_filename = "../test/CodeGen/X86/avoid-sfb-mir.ll"5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"6 target triple = "x86_64-unknown-linux-gnu"7 8 %struct.S = type { i32, i32, i32, i32 }9 10 ; Function Attrs: nounwind uwtable11 define void @test_imm_store(ptr noalias nocapture %s1, ptr nocapture %s2, i32 %x, ptr nocapture %s3) local_unnamed_addr #0 {12 entry:13 %a2 = bitcast ptr %s1 to ptr14 store i32 0, ptr %a2, align 415 %a13 = bitcast ptr %s3 to ptr16 store i32 1, ptr %a13, align 417 %0 = bitcast ptr %s2 to ptr18 %1 = bitcast ptr %s1 to ptr19 call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 %1, i64 16, i1 false)20 ret void21 }22 23 declare void @bar(ptr) local_unnamed_addr24 25 ; Function Attrs: argmemonly nounwind26 declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1) #127 28...29---30name: test_imm_store31alignment: 1632tracksRegLiveness: true33registers:34 - { id: 0, class: gr64 }35 - { id: 1, class: gr64 }36 - { id: 2, class: gr32 }37 - { id: 3, class: gr64 }38 - { id: 4, class: vr128 }39liveins:40 - { reg: '$rdi', virtual-reg: '%0' }41 - { reg: '$rsi', virtual-reg: '%1' }42 - { reg: '$rcx', virtual-reg: '%3' }43body: |44 bb.0.entry:45 liveins: $rdi, $rsi, $rcx46 ; CHECK: MOV32mi %0, 1, $noreg, 0, $noreg, 0 :: (store (s32) into %ir.a2)47 ; CHECK-NEXT: MOV32mi %3, 1, $noreg, 0, $noreg, 1 :: (store (s32) into %ir.a13)48 ; CHECK-NEXT: %5:gr32 = MOV32rm %0, 1, $noreg, 0, $noreg :: (load (s32) from %ir.1)49 ; CHECK-NEXT: MOV32mr %1, 1, $noreg, 0, $noreg, killed %5 :: (store (s32) into %ir.0)50 ; CHECK-NEXT: %6:gr64 = MOV64rm %0, 1, $noreg, 4, $noreg :: (load (s64) from %ir.1 + 4, align 4)51 ; CHECK-NEXT: MOV64mr %1, 1, $noreg, 4, $noreg, killed %6 :: (store (s64) into %ir.0 + 4, align 4)52 ; CHECK-NEXT: %7:gr32 = MOV32rm killed %0, 1, $noreg, 12, $noreg :: (load (s32) from %ir.1 + 12)53 ; CHECK-NEXT: MOV32mr killed %1, 1, $noreg, 12, $noreg, killed %7 :: (store (s32) into %ir.0 + 12)54 55 %3:gr64 = COPY $rcx56 %1:gr64 = COPY $rsi57 %0:gr64 = COPY $rdi58 MOV32mi %0, 1, $noreg, 0, $noreg, 0 :: (store (s32) into %ir.a2)59 MOV32mi %3, 1, $noreg, 0, $noreg, 1 :: (store (s32) into %ir.a13)60 %4:vr128 = MOVUPSrm killed %0, 1, $noreg, 0, $noreg :: (load (s128) from %ir.1, align 4)61 MOVUPSmr killed %1, 1, $noreg, 0, $noreg, killed %4 :: (store (s128) into %ir.0, align 4)62 RET 063 64...65