brintos

brintos / llvm-project-archived public Read only

0
0
Text · 733 B · 9e30081 Raw
27 lines · plain
1// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR2// RUN: cir-opt %s -cir-to-llvm -o - | mlir-translate -mlir-to-llvmir | FileCheck %s -check-prefix=LLVM3 4!u8i = !cir.int<u, 8>5 6module  {7  cir.func @stack_save() {8    %0 = cir.stacksave : !cir.ptr<!u8i>9    cir.stackrestore %0 : !cir.ptr<!u8i>10    cir.return11  }12}13 14//      MLIR: module {15// MLIR-NEXT:  llvm.func @stack_save16// MLIR-NEXT:    %0 = llvm.intr.stacksave : !llvm.ptr17// MLIR-NEXT:    llvm.intr.stackrestore %0 : !llvm.ptr18// MLIR-NEXT:    llvm.return19// MLIR-NEXT:  }20// MLIR-NEXT: }21 22// LLVM: define void @stack_save() {23// LLVM:  %1 = call ptr @llvm.stacksave.p0()24// LLVM:  call void @llvm.stackrestore.p0(ptr %1)25// LLVM:  ret void26// LLVM: }27