[flang] Lower F08 shift intrinsics
authorTarun Prabhu <tarun.prabhu@gmail.com>
Fri, 22 Jul 2022 05:36:08 +0000 (23:36 -0600)
committerTarun Prabhu <tarun.prabhu@gmail.com>
Fri, 22 Jul 2022 05:36:08 +0000 (23:36 -0600)
commit72ac3e90da47d2b47a60b9fb04408d64e36efe53
tree55a2507998099fd961034c19e670f9867d2c4372
parent2ab0aeaae2e8f870b9d5b5556e1328d50318eb8f
[flang] Lower F08 shift intrinsics

Lower F08 shift (shiftl, shiftr, shifta) and combined shift (dshiftl, dshiftr)
intrinsics. The combined shift intrinsics are implemented using the
definitions of shiftl and shiftr as described by the standard.

For non-conformant arguments to the shift intrinsics, the implementation tries
to replicate the behavior of other compilers if most of the other behave
consistently.

Differential Revision: https://reviews.llvm.org/D129316
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Lower/Intrinsics/dshiftl.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/dshiftr.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/shifta.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/shiftl.f90 [new file with mode: 0644]
flang/test/Lower/Intrinsics/shiftr.f90 [new file with mode: 0644]