brintos

brintos / llvm-project-archived public Read only

0
0
Text · 711 B · b772e8b Raw
16 lines · plain
1! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s2 3subroutine not_test4    integer :: source5    integer :: destination6    ! CHECK-LABEL: not_test7    ! CHECK: %[[dest:.*]] = fir.alloca i32 {bindc_name = "destination", uniq_name = "_QFnot_testEdestination"}8    ! CHECK: %[[source:.*]] = fir.alloca i32 {bindc_name = "source", uniq_name = "_QFnot_testEsource"}9    ! CHECK: %[[loaded_source:.*]] = fir.load %[[source]] : !fir.ref<i32>10    ! CHECK: %[[all_ones:.*]] = arith.constant -1 : i3211    ! CHECK: %[[result:.*]] = arith.xori %[[loaded_source]], %[[all_ones]] : i3212    ! CHECK: fir.store %[[result]] to %[[dest]] : !fir.ref<i32>13    ! CHECK: return14    destination = not(source)15  end subroutine16