https://github.com/shiltian closed
https://github.com/llvm/llvm-project/pull/81669
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic approved this pull request.
LGTM
(It feels a little weird that the types in the clang AST don't actually match
the LLVM builtin, but I guess it's not likely to actually cause any issues.)
https://github.com/llvm/llvm-project/pull/81669
_
shiltian wrote:
> Don't see how that could be related; you can losslessly bitconvert between
> i16 and bfloat
Yes, `canLosslesslyBitCastTo` doesn't allow cast between `i16` and `bfloat`,
but it does between two vectors, as long as their sizes are the same.
> A cast between float and int sound
nikic wrote:
> I think the right fix is teaching that function about FP <-> INT casts.
The documentation for that function says:
```
/// Return true if this type could be converted with a lossless BitCast to
/// type 'Ty'. For example, i8* to i32*. BitCasts are valid for types of the
/// s
Pierre-vh wrote:
> > Sorry, I should have clearly mentioned that. Yes, it is for my followup
> > change #80908. In #80908, we changed the type of LLVM builtin but kept the
> > corresponding clang builtin unchanged to avoid breaking existing uses.
>
> Don't see how that could be related; you ca
arsenm wrote:
> Sorry, I should have clearly mentioned that. Yes, it is for my followup
> change #80908. In #80908, we changed the type of LLVM builtin but kept the
> corresponding clang builtin unchanged to avoid breaking existing uses.
Don't see how that could be related; you can losslessly
shiltian wrote:
> I can't tell what you're trying to fix here. Is this fixing a crash? Or is
> the check redundant? Or is it necessary for some followup change you want to
> make?
Sorry, I should have clearly mentioned that. Yes, it is for my followup change
#80908. In #80908, we changed the
efriedma-quic wrote:
I can't tell what you're trying to fix here. Is this fixing a crash? Or is
the check redundant? Or is it necessary for some followup change you want to
make?
https://github.com/llvm/llvm-project/pull/81669
___
cfe-commits mail
llvmbot wrote:
@llvm/pr-subscribers-clang-codegen
@llvm/pr-subscribers-clang
Author: Shilei Tian (shiltian)
Changes
This patch looses the cast check (`canLosslesslyBitCastTo`) and leaves it to the
one inside `CreateBitCast`. It seems too conservative for the use case here.
---
Full diff:
https://github.com/shiltian created
https://github.com/llvm/llvm-project/pull/81669
This patch looses the cast check (`canLosslesslyBitCastTo`) and leaves it to the
one inside `CreateBitCast`. It seems too conservative for the use case here.
>From 813441fd3106a0069346aabd0dd828d8feb8ea53 Mon S
10 matches
Mail list logo