xref: /llvm-project/clang/test/CodeGen/builtins-loongarch.c (revision 47edc70866920693d99e5b31014ba761a796d181)
1 // RUN: %clang_cc1 -Wall -Wno-unused-but-set-variable -Werror -triple loongarch32 -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s
2 // RUN: %clang_cc1 -Wall -Wno-unused-but-set-variable -Werror -triple loongarch64 -disable-O0-optnone -emit-llvm -o - %s | opt -S -passes=mem2reg | FileCheck %s
3 
test_eh_return_data_regno(void)4 void test_eh_return_data_regno(void) {
5   // CHECK: store volatile i32 4
6   // CHECK: store volatile i32 5
7   volatile int res;
8   res = __builtin_eh_return_data_regno(0);
9   res = __builtin_eh_return_data_regno(1);
10 }
11