Home | History | Annotate | Download | only in Generic
      1 # RUN: llc -start-after machine-sink -stop-after machine-sink -o - %s | FileCheck %s
      2 # This test ensures that the MIR parser parses machine frame info properties
      3 # correctly.
      4 
      5 --- |
      6 
      7   define i32 @test(i32 %a) {
      8   entry:
      9     %b = alloca i32
     10     store i32 %a, i32* %b
     11     %c = load i32, i32* %b
     12     ret i32 %c
     13   }
     14 
     15   define i32 @test2(i32 %a) {
     16   entry:
     17     %b = alloca i32
     18     store i32 %a, i32* %b
     19     %c = load i32, i32* %b
     20     ret i32 %c
     21   }
     22 
     23 ...
     24 ---
     25 name:            test
     26 isSSA:           true
     27 tracksRegLiveness: true
     28 
     29 # CHECK: frameInfo:
     30 # CHECK-NEXT: isFrameAddressTaken: false
     31 # CHECK-NEXT: isReturnAddressTaken: false
     32 # CHECK-NEXT: hasStackMap: false
     33 # CHECK-NEXT: hasPatchPoint: false
     34 # CHECK-NEXT: stackSize: 0
     35 # CHECK-NEXT: offsetAdjustment: 0
     36 # Note: max alignment can be target specific when printed.
     37 # CHECK-NEXT: maxAlignment:
     38 # CHECK-NEXT: adjustsStack: false
     39 # CHECK-NEXT: hasCalls: false
     40 # CHECK-NEXT: maxCallFrameSize: 0
     41 # CHECK-NEXT: hasOpaqueSPAdjustment: false
     42 # CHECK-NEXT: hasVAStart: false
     43 # CHECK-NEXT: hasMustTailInVarArgFunc: false
     44 # CHECK: body
     45 frameInfo:
     46   maxAlignment:    4
     47 body: |
     48   bb.0.entry:
     49 ...
     50 ---
     51 name:            test2
     52 isSSA:           true
     53 tracksRegLiveness: true
     54 
     55 # CHECK: test2
     56 # CHECK: frameInfo:
     57 # CHECK-NEXT: isFrameAddressTaken: true
     58 # CHECK-NEXT: isReturnAddressTaken: true
     59 # CHECK-NEXT: hasStackMap: true
     60 # CHECK-NEXT: hasPatchPoint: true
     61 # CHECK-NEXT: stackSize: 4
     62 # CHECK-NEXT: offsetAdjustment: 4
     63 # Note: max alignment can be target specific when printed.
     64 # CHECK-NEXT: maxAlignment:
     65 # CHECK-NEXT: adjustsStack: true
     66 # CHECK-NEXT: hasCalls: true
     67 # CHECK-NEXT: maxCallFrameSize: 4
     68 # CHECK-NEXT: hasOpaqueSPAdjustment: true
     69 # CHECK-NEXT: hasVAStart: true
     70 # CHECK-NEXT: hasMustTailInVarArgFunc: true
     71 # CHECK: body
     72 frameInfo:
     73   isFrameAddressTaken: true
     74   isReturnAddressTaken: true
     75   hasStackMap:     true
     76   hasPatchPoint:   true
     77   stackSize:       4
     78   offsetAdjustment: 4
     79   maxAlignment:    4
     80   adjustsStack:    true
     81   hasCalls:        true
     82   maxCallFrameSize: 4
     83   hasOpaqueSPAdjustment: true
     84   hasVAStart:      true
     85   hasMustTailInVarArgFunc: true
     86 body: |
     87   bb.0.entry:
     88 ...
     89 
     90