[clang] [Clang][CodeGen] Loose the cast check when emitting builtins (PR #81669)
    Pierre van Houtryve via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Feb 14 04:15:56 PST 2024
    
    
  
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 can losslessly bitconvert between i16 and bfloat
I guess it's an oversight from that function to not allow FP <-> INT casts when they have the same width?
It seems like it'd let `<4 x i16>` to  `<4 x bf16>` pass.
I think the right fix is teaching that function about FP <-> INT casts. 
What do you think @nikic ?
https://github.com/llvm/llvm-project/pull/81669
    
    
More information about the cfe-commits
mailing list