Why clang's float use 8bytes, It should be 4 bytes. How can I fix it?

hi,all
my 32bit backend float use 8 bytes in ll file.
my code as follow:
/input.c/
float b = 2.7;//float hex:402ccc8a,double hex:0x40059999A000000
int c = 3;
b = c;
/input.ll
/
; ModuleID = ‘D:\git_soft\compiler10\dsp_test_01\scripts…\testcase_8slots\input.c’
source_filename = “D:\git_soft\compiler10\dsp_test_01\scripts\…\testcase_8slots\input.c”
target datalayout = “e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64”
target triple = “dsp”

@dbg_addr = dso_local constant i32* inttoptr (i32 -1610612736 to i32*), align 4, !dbg !0

; Function Attrs: noinline nounwind optnone
define dso_local i32 @main() #0 !dbg !18 {
entry:
%retval = alloca i32, align 4
%b = alloca float, align 4
%c = alloca i32, align 4
store i32 0, i32* %retval, align 4
call void @llvm.dbg.declare(metadata float* %b, metadata !21, metadata !DIExpression()), !dbg !23
store float 0x40059999A0000000, float %b, align 4, !dbg !23*
call void @llvm.dbg.declare(metadata i32* %c, metadata !24, metadata !DIExpression()), !dbg !25
store i32 3, i32* %c, align 4, !dbg !25
%0 = load i32, i32* %c, align 4, !dbg !26
%conv = sitofp i32 %0 to float, !dbg !26
store float %conv, float* %b, align 4, !dbg !27
%1 = bitcast float* %b to i32*, !dbg !28
%arrayidx = getelementptr inbounds i32, i32* %1, i32 0, !dbg !28
%2 = load i32, i32* %arrayidx, align 4, !dbg !28
store volatile i32 %2, i32* inttoptr (i32 -1610612736 to i32*), align 4, !dbg !29
ret i32 0, !dbg !30
}


How can I fix “store float 0x40059999A0000000, float* %b, align 4, !dbg !23” in right way?

I’m not entirely sure why, but floats that need to be printed in hex are printed as a double even though they’re really 4 bytes: llvm-project/AsmWriter.cpp at c7ee0b8bda8b32a800bc01e9151b364446a6e1b1 · llvm/llvm-project · GitHub.

So I think that IR is fine.

thanks, you are right.
Although the .ll file prints float as double hex,but backend treat it as float.