[all-commits] [llvm/llvm-project] a19e5a: [flang] load SECOND result in genSecond (#99342)

jeanPerier via All-commits all-commits at lists.llvm.org
Thu Jul 18 00:36:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a19e5aedd9b15ecf0b05bafb7d20e13c952b4531
      https://github.com/llvm/llvm-project/commit/a19e5aedd9b15ecf0b05bafb7d20e13c952b4531
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2024-07-18 (Thu, 18 Jul 2024)

  Changed paths:
    M flang/lib/Lower/ConvertCall.cpp
    M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
    M flang/test/Lower/Intrinsics/second.f90

  Log Message:
  -----------
  [flang] load SECOND result in genSecond (#99342)

Until genSecond, all intrinsic `genXXX` returning scalar intrinsic
(except NULL) were returning them as value.

The code calling genIntrinsicCall is using that assumption when
generation the asExprOp because hflir.expr<> of scalar are badly
supported in tools (I should likely just forbid them all together), the
type is meant for "non trivial" values: arrays, character, and derived
type. For instance, the added tests crashed with error: `'arith.subf' op
operand #0 must be floating-point-like, but got '!hlfir.expr<f32>'`

Load the result in genSecond and add an assert after genIntrinsicCall to
better enforce this.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list