diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-05-29 22:54:57 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-05-29 22:54:57 +0000 |
commit | 5b63908f9f8f509e088026728d82c3f1d29db0f5 (patch) | |
tree | dcfc63da659d50b6094ddb34735ead172c8ab12c /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 32a9da5668d3eb9f34930bf37b67258996a70188 (diff) | |
download | llvm-5b63908f9f8f509e088026728d82c3f1d29db0f5.zip llvm-5b63908f9f8f509e088026728d82c3f1d29db0f5.tar.gz llvm-5b63908f9f8f509e088026728d82c3f1d29db0f5.tar.bz2 |
[Sema] Promote compound assignment exprs. with fp16 LHS and int. RHS.
We catch most of the various other __fp16 implicit conversions to
float, but not this one:
__fp16 a;
int i;
...
a += i;
For which we used to generate something 'fun' like:
%conv = sitofp i32 %i to float
%1 = tail call i16 @llvm.convert.to.fp16.f32(float %conv)
%add = add i16 %0, %1
Instead, when we have an __fp16 LHS and an integer RHS, we should
use float as the result type.
While there, add a bunch of missing tests for mixed
__fp16/integer expressions.
llvm-svn: 238625
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions