[Chapel Merge] Fix an issue involving 32-bit floating point math

Branch: refs/heads/main
Revision: 0609e33
Author: daviditen
Log Message:

Merge pull request #18229 from daviditen/llvm-kernelmatrix-error

Fix an issue involving 32-bit floating point math in the LLVM backend

[reviewed by @dlongnecke-cray]

Fix an issue that was leading to an internal error with the LLVM backend that
caused it to print "DestTy too big for FPTrunc" and fail a consistency check.

When code generating an operation where the lhs was real(32) and the rhs was
real(64) we were generating FPTrunc(lhs, rhs.type). We instead need
FPExt(lhs, rhs.type).

Added a test derived from the code in issue #15817 that reproduces the error
prior to this fix.

Signed-off-by: David Iten daviditen@users.noreply.github.com

Modified Files:
A test/types/real/issue15817.chpl

A test/types/real/issue15817.good
M compiler/llvm/llvmUtil.cpp

Compare: https://github.com/chapel-lang/chapel/compare/46fce1b14400...0609e33595ad