[rtsan] Add fork/execve interceptors (#117198)
[llvm-project.git] / flang / test / Lower / Intrinsics / btest.f90
blob6c0fccd0f5a9fafd7cd2708edf55564c0002d1aa
1 ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
3 ! CHECK-LABEL: btest_test
4 function btest_test(i, j)
5 logical btest_test
6 ! CHECK-DAG: %[[result:[0-9]+]] = fir.alloca !fir.logical<4> {bindc_name = "btest_test"
7 ! CHECK-DAG: %[[i:[0-9]+]] = fir.load %arg0 : !fir.ref<i32>
8 ! CHECK-DAG: %[[j:[0-9]+]] = fir.load %arg1 : !fir.ref<i32>
9 ! CHECK-DAG: %[[VAL_5:.*]] = arith.shrui %[[i]], %[[j]] : i32
10 ! CHECK-DAG: %[[VAL_6:.*]] = arith.constant 1 : i32
11 ! CHECK: %[[VAL_7:.*]] = arith.andi %[[VAL_5]], %[[VAL_6]] : i32
12 ! CHECK: %[[VAL_8:.*]] = fir.convert %[[VAL_7]] : (i32) -> !fir.logical<4>
13 ! CHECK: fir.store %[[VAL_8]] to %[[result]] : !fir.ref<!fir.logical<4>>
14 ! CHECK: %[[VAL_9:.*]] = fir.load %[[result]] : !fir.ref<!fir.logical<4>>
15 ! CHECK: return %[[VAL_9]] : !fir.logical<4>
16 btest_test = btest(i, j)
17 end