diff --git a/gcc/config/bpf/bpf.h b/gcc/config/bpf/bpf.h
index c8dad55fd4c4..32730628febe 100644
--- a/gcc/config/bpf/bpf.h
+++ b/gcc/config/bpf/bpf.h
@@ -43,14 +43,13 @@
 #define BITS_PER_WORD 64
 #define UNITS_PER_WORD 8
 
-/* When storing an integer whose size is less than 64-bit in a
-   register, promote it to a DImode.  */
+/* Promote integer modes smaller than a word to SImode.  */
 #define PROMOTE_MODE(M, UNSIGNEDP, TYPE)	\
   do						\
     {						\
       if (GET_MODE_CLASS (M) == MODE_INT	\
-	  && GET_MODE_SIZE (M) < 8)		\
-	M = DImode;				\
+	  && GET_MODE_SIZE (M) < 4)		\
+	M = SImode;				\
     } while (0)
 
 /* Align argument parameters on the stack to 64-bit, at a minimum.  */
diff --git a/gcc/testsuite/gcc.target/bpf/btfext-lineinfo.c b/gcc/testsuite/gcc.target/bpf/btfext-lineinfo.c
index dc1c297d663e..9d3a68e2ddef 100644
--- a/gcc/testsuite/gcc.target/bpf/btfext-lineinfo.c
+++ b/gcc/testsuite/gcc.target/bpf/btfext-lineinfo.c
@@ -38,12 +38,12 @@ int bar_func (struct T *t)
 
 /* { dg-final { scan-assembler-times "btfext-lineinfo\.c.0\"\[\t \]+\[^\n\]*btf_aux_string" 1 } } */
 /* { dg-final { scan-assembler-times "4byte\[\t \]+\.LFB.\[\t \]+# insn_label" 2 } } */
-/* { dg-final { scan-assembler-times "4byte\[\t \]+LI.\[\t \]+# insn_label" 6 } } */
+/* { dg-final { scan-assembler-times "4byte\[\t \]+LI.\[\t \]+# insn_label" 8 } } */
 
-/* { dg-final { scan-assembler-times "# \\(line, col\\)" 8 } } */
+/* { dg-final { scan-assembler-times "# \\(line, col\\)" 10 } } */
 /* { dg-final { scan-assembler-times "# \\(line, col\\) \\(18, 5\\)" 1 } } */
-/* { dg-final { scan-assembler-times "# \\(line, col\\) \\(20, 10\\)" 1 } } */
-/* { dg-final { scan-assembler-times "# \\(line, col\\) \\(21, 18\\)" 1 } } */
+/* { dg-final { scan-assembler-times "# \\(line, col\\) \\(20, 10\\)" 2 } } */
+/* { dg-final { scan-assembler-times "# \\(line, col\\) \\(21, 18\\)" 2 } } */
 /* { dg-final { scan-assembler-times "# \\(line, col\\) \\(22, 1\\)" 1 } } */
 /* { dg-final { scan-assembler-times "# \\(line, col\\) \\(25, 5\\)" 1 } } */
 /* { dg-final { scan-assembler-times "# \\(line, col\\) \\(28, 7\\)" 1 } } */
