[all-commits] [llvm/llvm-project] 7709f1: Bitwise comparison intrinsics

Tarun Prabhu via All-commits all-commits at lists.llvm.org
Tue Jul 19 09:42:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7709f12ed08d2d80afa8b3a95b8abe99a112dcd4
      https://github.com/llvm/llvm-project/commit/7709f12ed08d2d80afa8b3a95b8abe99a112dcd4
  Author: Tarun Prabhu <tarunprabhu at gmail.com>
  Date:   2022-07-19 (Tue, 19 Jul 2022)

  Changed paths:
    M flang/lib/Evaluate/fold-logical.cpp
    M flang/lib/Lower/IntrinsicCall.cpp
    A flang/test/Evaluate/fold-bitwise-compare.f90
    A flang/test/Lower/Intrinsics/bge.f90
    A flang/test/Lower/Intrinsics/bgt.f90
    A flang/test/Lower/Intrinsics/ble.f90
    A flang/test/Lower/Intrinsics/blt.f90

  Log Message:
  -----------
  Bitwise comparison intrinsics

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.

Reviewed By: klausler, jeanPerier

Differential Revision: https://reviews.llvm.org/D127805




More information about the All-commits mailing list