This is an archive of the discontinued LLVM Phabricator instance.

[flang][hlfir] Added missing fir.convert for i1 result of hlfir.dot_product.
ClosedPublic

Authored by vzakhari on Jul 20 2023, 9:27 PM.

Details

Summary

Some operations using the result of hlfir.dot_product can tolerate
that the type of the result changes from !fir.logical to i1 during
intrinsics lowering, but some won't. I added a separate LIT case with
fir.store to mimic one of the nag tests.

Diff Detail

Event Timeline

vzakhari created this revision.Jul 20 2023, 9:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2023, 9:27 PM
vzakhari requested review of this revision.Jul 20 2023, 9:27 PM
kiranchandramohan added inline comments.
flang/test/HLFIR/dot_product-lowering.fir
100

The test is failing. Is VAL_7 significant?

/var/lib/buildkite-agent/builds/llvm-project/flang/test/HLFIR/dot_product-lowering.fir:100:11: error: CHECK: expected string not found in input
// CHECK: %[[VAL_7:.*]] = arith.constant 84 : index
          ^
<stdin>:60:43: note: scanning from here
 %3 = fir.absent !fir.box<!fir.logical<4>>
                                          ^
<stdin>:62:2: note: possible intended match here
 %c87 = arith.constant 87 : index
vzakhari added inline comments.Jul 21 2023, 9:03 AM
flang/test/HLFIR/dot_product-lowering.fir
100

Thank you, Kiran! I just forgot to remove it here. Will fix.

vzakhari updated this revision to Diff 542963.Jul 21 2023, 9:19 AM

Fixed LIT test.

This revision is now accepted and ready to land.Jul 21 2023, 9:21 AM
This revision was landed with ongoing or failed builds.Jul 21 2023, 12:57 PM
This revision was automatically updated to reflect the committed changes.