[flang-commits] [PATCH] D127805: Bitwise comparison intrinsics

Tarun Prabhu via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jun 14 15:44:47 PDT 2022


tarunprabhu created this revision.
tarunprabhu added reviewers: Flang, flang-commits.
tarunprabhu added a project: Flang.
Herald added subscribers: mehdi_amini, jdoerfert.
Herald added a project: All.
tarunprabhu requested review of this revision.

This patch implements lowering for the F08 bitwise comparison intrinsics (BGE, BGT, BLE and BLT).

This does not create any runtime functions since the functionality is simple enough to carry out in IR.

The existing semantic check has been changed because it unconditionally converted the arguments to the largest possible integer type. This resulted in the argument with the smaller bit-size being sign-extended. However, the standard requires the argument with the smaller bit-size to be zero-extended.


https://reviews.llvm.org/D127805

Files:
  flang/lib/Evaluate/fold-logical.cpp
  flang/lib/Lower/IntrinsicCall.cpp
  flang/test/Lower/Intrinsics/bge.f90
  flang/test/Lower/Intrinsics/bgt.f90
  flang/test/Lower/Intrinsics/ble.f90
  flang/test/Lower/Intrinsics/blt.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127805.436962.patch
Type: text/x-patch
Size: 37393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220614/9dcdc054/attachment-0001.bin>


More information about the flang-commits mailing list