Revert "[InstCombine] Support gep nuw in icmp folds" (#118698)
[llvm-project.git] / flang / test / Lower / Intrinsics / ibset.f90
blob254adf75216a1a01089659d94fde5fe3bb115f00
1 ! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
2 ! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir %s -o - | FileCheck %s
4 ! CHECK-LABEL: ibset_test
5 function ibset_test(i, j)
6 ! CHECK-DAG: %[[result:.*]] = fir.alloca i32 {bindc_name = "ibset_test"
7 ! CHECK-DAG: %[[i:.*]] = fir.load %arg0 : !fir.ref<i32>
8 ! CHECK-DAG: %[[j:.*]] = fir.load %arg1 : !fir.ref<i32>
9 ! CHECK-DAG: %[[VAL_5:.*]] = arith.constant 1 : i32
10 ! CHECK: %[[VAL_6:.*]] = arith.shli %[[VAL_5]], %[[j]] : i32
11 ! CHECK: %[[VAL_7:.*]] = arith.ori %[[i]], %[[VAL_6]] : i32
12 ! CHECK: fir.store %[[VAL_7]] to %[[result]] : !fir.ref<i32>
13 ! CHECK: %[[VAL_8:.*]] = fir.load %[[result]] : !fir.ref<i32>
14 ! CHECK: return %[[VAL_8]] : i32
15 ibset_test = ibset(i, j)
16 end