brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · 6d7f294 Raw
69 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 32# RUN: llc -run-pass=stack-coloring %s -o - | FileCheck %s3 4# We do not expect any stack coloring remappings in this test case.5# And then there should be no reason to drop the tbaa metadata on the6# MOV8rm instruction, so we check that the tbaa info is kept.7 8--- |9  source_filename = "test_case.cc"10  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"11  target triple = "x86_64-unknown-linux-gnu"12 13  %struct.Agg = type { [3 x i8], [3 x i8] }14 15  define i8 @main() {16    %padding = alloca %struct.Agg, align 817    %agg = alloca %struct.Agg, align 818    %a2 = getelementptr inbounds %struct.Agg, ptr %agg, i64 0, i32 119    %a22 = getelementptr inbounds [3 x i8], ptr %a2, i64 0, i32 120    %t0 = load i8, ptr %a22, align 1, !tbaa !221    %tobool = icmp slt i8 %t0, 022    %t1 = load ptr, ptr %a2, align 823    %cond = select i1 %tobool, ptr %t1, ptr %a224    %add.ptr.i = getelementptr inbounds i8, ptr %cond, i64 1625    %t2 = load i8, ptr %add.ptr.i, align 1, !tbaa !226    ret i8 %t227  }28 29  !llvm.module.flags = !{!0}30  !llvm.ident = !{!1}31 32  !0 = !{i32 1, !"wchar_size", i32 4}33  !1 = !{!"clang version 9.0.0"}34  !2 = !{!3, !3, i64 0}35  !3 = !{!"omnipotent char", !4, i64 0}36  !4 = !{!"Simple C++ TBAA"}37 38...39---40name:            main41alignment:       1642tracksRegLiveness: true43stack:44  - { id: 0, name: padding, type: default, offset: 0, size: 24, alignment: 16,45      stack-id: default, callee-saved-register: '', callee-saved-restored: true,46      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }47  - { id: 1, name: agg, type: default, offset: 0, size: 48, alignment: 16,48      stack-id: default, callee-saved-register: '', callee-saved-restored: true,49      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }50body:             |51  bb.0:52    ; CHECK-LABEL: name: main53    ; CHECK: [[LEA64r:%[0-9]+]]:gr64 = nuw LEA64r %stack.1.agg, 1, $noreg, 24, $noreg54    ; CHECK-NEXT: CMP8mi %stack.1.agg, 1, $noreg, 47, $noreg, 0, implicit-def $eflags :: (dereferenceable load (s8) from %ir.a22, !tbaa !2)55    ; CHECK-NEXT: [[CMOV64rm:%[0-9]+]]:gr64 = CMOV64rm [[LEA64r]], %stack.1.agg, 1, $noreg, 24, $noreg, 8, implicit $eflags :: (dereferenceable load (s64) from %ir.a2)56    ; CHECK-NEXT: [[MOV8rm:%[0-9]+]]:gr8 = MOV8rm killed [[CMOV64rm]], 1, $noreg, 16, $noreg :: (load (s8) from %ir.add.ptr.i, !tbaa !2)57    ; CHECK-NEXT: $al = COPY [[MOV8rm]]58    ; CHECK-NEXT: RET 0, $al59    LIFETIME_START %stack.0.padding60    LIFETIME_START %stack.1.agg61    %8:gr64 = nuw LEA64r %stack.1.agg, 1, $noreg, 24, $noreg62    CMP8mi %stack.1.agg, 1, $noreg, 47, $noreg, 0, implicit-def $eflags :: (dereferenceable load (s8) from %ir.a22, !tbaa !2)63    %13:gr64 = CMOV64rm %8, %stack.1.agg, 1, $noreg, 24, $noreg, 8, implicit $eflags :: (dereferenceable load (s64) from %ir.a2)64    %14:gr8 = MOV8rm killed %13, 1, $noreg, 16, $noreg :: (load (s8) from %ir.add.ptr.i, !tbaa !2)65    $al = COPY %1466    RET 0, $al67 68...69