Index: llvm/test/CodeGen/AArch64/arm64-stackmap.ll =================================================================== --- llvm/test/CodeGen/AArch64/arm64-stackmap.ll +++ llvm/test/CodeGen/AArch64/arm64-stackmap.ll @@ -14,11 +14,11 @@ ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .short 0 ; Num Functions -; CHECK-NEXT: .long 11 +; CHECK-NEXT: .long 12 ; Num LargeConstants ; CHECK-NEXT: .long 3 ; Num Callsites -; CHECK-NEXT: .long 11 +; CHECK-NEXT: .long 12 ; Functions and stack size ; CHECK-NEXT: .quad _constantargs @@ -54,6 +54,9 @@ ; CHECK-NEXT: .quad _clobberLR ; CHECK-NEXT: .quad 112 ; CHECK-NEXT: .quad 1 +; CHECK-NEXT: .quad _floats +; CHECK-NEXT: .quad 32 +; CHECK-NEXT: .quad 1 ; Num LargeConstants ; CHECK-NEXT: .quad 4294967295 @@ -348,6 +351,60 @@ ret void } +; CHECK-LABEL: .long L{{.*}}-_floats +; CHECK-NEXT: .short 0 +; Num Locations +; CHECK-NEXT: .short 6 +; Loc 0: constant float stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 4 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 0: constant double stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 1: float value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 4 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 2: double value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 3: float on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long -{{.*}} +; Loc 4: double on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long -{{.*}} +define void @floats(float %f, double %g) { + %ff = alloca float + %gg = alloca double + call void (i64, i32, ...) @llvm.experimental.stackmap(i64 888, i32 0, float 1.25, + double 1.5, float %f, double %g, float* %ff, double* %gg) + ret void +} + declare void @llvm.experimental.stackmap(i64, i32, ...) declare void @llvm.experimental.patchpoint.void(i64, i32, i8*, i32, ...) declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...) Index: llvm/test/CodeGen/AArch64/stackmap.ll =================================================================== --- llvm/test/CodeGen/AArch64/stackmap.ll +++ llvm/test/CodeGen/AArch64/stackmap.ll @@ -9,11 +9,11 @@ ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .hword 0 ; Num Functions -; CHECK-NEXT: .word 14 +; CHECK-NEXT: .word 15 ; Num LargeConstants ; CHECK-NEXT: .word 4 ; Num Callsites -; CHECK-NEXT: .word 18 +; CHECK-NEXT: .word 19 ; Functions and stack size ; CHECK-NEXT: .xword constantargs @@ -58,6 +58,9 @@ ; CHECK-NEXT: .xword needsStackRealignment ; CHECK-NEXT: .xword -1 ; CHECK-NEXT: .xword 1 +; CHECK-NEXT: .xword floats +; CHECK-NEXT: .xword 32 +; CHECK-NEXT: .xword 1 ; Large Constants ; CHECK-NEXT: .xword 2147483648 @@ -502,6 +505,60 @@ } declare void @escape_values(...) +; CHECK-LABEL: .word .L{{.*}}-floats +; CHECK-NEXT: .hword 0 +; Num Locations +; CHECK-NEXT: .hword 6 +; Loc 0: constant float stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .hword 4 +; CHECK-NEXT: .hword {{.*}} +; CHECK-NEXT: .hword 0 +; CHECK-NEXT: .word 0 +; Loc 0: constant double stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .hword 8 +; CHECK-NEXT: .hword {{.*}} +; CHECK-NEXT: .hword 0 +; CHECK-NEXT: .word 0 +; Loc 1: float value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .hword 4 +; CHECK-NEXT: .hword {{.*}} +; CHECK-NEXT: .hword 0 +; CHECK-NEXT: .word 0 +; Loc 2: double value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .hword 8 +; CHECK-NEXT: .hword {{.*}} +; CHECK-NEXT: .hword 0 +; CHECK-NEXT: .word 0 +; Loc 3: float on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .hword 8 +; CHECK-NEXT: .hword {{.*}} +; CHECK-NEXT: .hword 0 +; CHECK-NEXT: .word -{{.*}} +; Loc 4: double on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .hword 8 +; CHECK-NEXT: .hword {{.*}} +; CHECK-NEXT: .hword 0 +; CHECK-NEXT: .word -{{.*}} +define void @floats(float %f, double %g) { + %ff = alloca float + %gg = alloca double + call void (i64, i32, ...) @llvm.experimental.stackmap(i64 888, i32 0, float 1.25, + double 1.5, float %f, double %g, float* %ff, double* %gg) + ret void +} + declare void @llvm.experimental.stackmap(i64, i32, ...) declare void @llvm.experimental.patchpoint.void(i64, i32, i8*, i32, ...) declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...) Index: llvm/test/CodeGen/PowerPC/ppc64-stackmap.ll =================================================================== --- llvm/test/CodeGen/PowerPC/ppc64-stackmap.ll +++ llvm/test/CodeGen/PowerPC/ppc64-stackmap.ll @@ -40,6 +40,9 @@ ; CHECK-LABEL: clobberLR: ; CHECK: {{^}}.L[[clobberLR_BEGIN:.*]]:{{$}} +; CHECK-LABEL: floats: +; CHECK: {{^}}.L[[floats_BEGIN:.*]]:{{$}} + ; CHECK-LABEL: .section .llvm_stackmaps ; CHECK-NEXT: __LLVM_StackMaps: @@ -48,11 +51,11 @@ ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .short 0 ; Num Functions -; CHECK-NEXT: .long 11 +; CHECK-NEXT: .long 12 ; Num LargeConstants ; CHECK-NEXT: .long 3 ; Num Callsites -; CHECK-NEXT: .long 11 +; CHECK-NEXT: .long 12 ; Functions and stack size ; CHECK-NEXT: .quad constantargs @@ -88,6 +91,9 @@ ; CHECK-NEXT: .quad clobberLR ; CHECK-NEXT: .quad 208 ; CHECK-NEXT: .quad 1 +; CHECK-NEXT: .quad floats +; CHECK-NEXT: .quad 80 +; CHECK-NEXT: .quad 1 ; Num LargeConstants ; CHECK-NEXT: .quad 4294967295 @@ -382,6 +388,60 @@ ret void } +; CHECK: .long .L{{.*}}-.L[[floats_BEGIN]] +; CHECK-NEXT: .short 0 +; Num Locations +; CHECK-NEXT: .short 6 +; Loc 0: constant float stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 0: constant double stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 1: float value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 2: double value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 3: float on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long {{.*}} +; Loc 4: double on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long {{.*}} +define void @floats(float %f, double %g) { + %ff = alloca float + %gg = alloca double + call void (i64, i32, ...) @llvm.experimental.stackmap(i64 888, i32 0, float 1.25, + double 1.5, float %f, double %g, float* %ff, double* %gg) + ret void +} + declare void @llvm.experimental.stackmap(i64, i32, ...) declare void @llvm.experimental.patchpoint.void(i64, i32, i8*, i32, ...) declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...) Index: llvm/test/CodeGen/SystemZ/stackmap.ll =================================================================== --- llvm/test/CodeGen/SystemZ/stackmap.ll +++ llvm/test/CodeGen/SystemZ/stackmap.ll @@ -9,11 +9,11 @@ ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .short 0 ; Num Functions -; CHECK-NEXT: .long 15 +; CHECK-NEXT: .long 16 ; Num LargeConstants ; CHECK-NEXT: .long 4 ; Num Callsites -; CHECK-NEXT: .long 19 +; CHECK-NEXT: .long 20 ; Functions and stack size ; CHECK-NEXT: .quad constantargs @@ -61,6 +61,9 @@ ; CHECK-NEXT: .quad needsStackRealignment ; CHECK-NEXT: .quad -1 ; CHECK-NEXT: .quad 1 +; CHECK-NEXT: .quad floats +; CHECK-NEXT: .quad 176 +; CHECK-NEXT: .quad 1 ; Large Constants ; CHECK-NEXT: .quad 2147483648 @@ -547,6 +550,60 @@ } declare void @escape_values(...) +; CHECK-LABEL: .long .L{{.*}}-floats +; CHECK-NEXT: .short 0 +; Num Locations +; CHECK-NEXT: .short 6 +; Loc 0: constant float stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 4 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 32 +; Loc 0: constant double stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 1: float value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 4 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 32 +; Loc 2: double value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 3: float on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long {{.*}} +; Loc 4: double on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long {{.*}} +define void @floats(float %f, double %g) { + %ff = alloca float + %gg = alloca double + call void (i64, i32, ...) @llvm.experimental.stackmap(i64 888, i32 0, float 1.25, + double 1.5, float %f, double %g, float* %ff, double* %gg) + ret void +} + declare void @llvm.experimental.stackmap(i64, i32, ...) declare void @llvm.experimental.patchpoint.void(i64, i32, i8*, i32, ...) declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...) Index: llvm/test/CodeGen/X86/stackmap.ll =================================================================== --- llvm/test/CodeGen/X86/stackmap.ll +++ llvm/test/CodeGen/X86/stackmap.ll @@ -9,11 +9,11 @@ ; CHECK-NEXT: .byte 0 ; CHECK-NEXT: .short 0 ; Num Functions -; CHECK-NEXT: .long 16 +; CHECK-NEXT: .long 17 ; Num LargeConstants ; CHECK-NEXT: .long 4 ; Num Callsites -; CHECK-NEXT: .long 20 +; CHECK-NEXT: .long 21 ; Functions and stack size ; CHECK-NEXT: .quad _constantargs @@ -64,6 +64,9 @@ ; CHECK-NEXT: .quad _needsStackRealignment ; CHECK-NEXT: .quad -1 ; CHECK-NEXT: .quad 1 +; CHECK-NEXT: .quad _floats +; CHECK-NEXT: .quad 24 +; CHECK-NEXT: .quad 1 ; Large Constants ; CHECK-NEXT: .quad 2147483648 @@ -585,6 +588,60 @@ } declare void @escape_values(...) +; CHECK-LABEL: .long L{{.*}}-_floats +; CHECK-NEXT: .short 0 +; Num Locations +; CHECK-NEXT: .short 6 +; Loc 0: constant float stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 16 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 0: constant double stored to FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 16 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 1: float value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 16 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 2: double value in FP register +; CHECK-NEXT: .byte 1 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 16 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long 0 +; Loc 3: float on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long -{{.*}} +; Loc 4: double on stack +; CHECK-NEXT: .byte 2 +; CHECK-NEXT: .byte 0 +; CHECK-NEXT: .short 8 +; CHECK-NEXT: .short {{.*}} +; CHECK-NEXT: .short 0 +; CHECK-NEXT: .long -{{.*}} +define void @floats(float %f, double %g) { + %ff = alloca float + %gg = alloca double + call void (i64, i32, ...) @llvm.experimental.stackmap(i64 888, i32 0, float 1.25, + double 1.5, float %f, double %g, float* %ff, double* %gg) + ret void +} + declare void @llvm.experimental.stackmap(i64, i32, ...) declare void @llvm.experimental.patchpoint.void(i64, i32, i8*, i32, ...) declare i64 @llvm.experimental.patchpoint.i64(i64, i32, i8*, i32, ...)