diff --git a/llvm/lib/Target/BPF/BPFSubtarget.cpp b/llvm/lib/Target/BPF/BPFSubtarget.cpp index ab3452501b9526b8dbb48d3afc93f57154856c27..f3cb03b1f1f57d3650f4dc35365aa978099ea634 100644 --- a/llvm/lib/Target/BPF/BPFSubtarget.cpp +++ b/llvm/lib/Target/BPF/BPFSubtarget.cpp @@ -52,6 +52,7 @@ void BPFSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { if (CPU == "v3") { HasJmpExt = true; HasJmp32 = true; + HasAlu32 = true; return; } } diff --git a/llvm/test/CodeGen/BPF/32-bit-subreg-alu.ll b/llvm/test/CodeGen/BPF/32-bit-subreg-alu.ll index 2a498494589aa522f3e74b018c0fc7594e314670..2e4e92e0126eb7da0b3eea76f3e5d77a0035e75e 100644 --- a/llvm/test/CodeGen/BPF/32-bit-subreg-alu.ll +++ b/llvm/test/CodeGen/BPF/32-bit-subreg-alu.ll @@ -1,4 +1,5 @@ ; RUN: llc -O2 -march=bpfel -mattr=+alu32 < %s | FileCheck %s +; RUN: llc -O2 -march=bpfel -mcpu=v3 < %s | FileCheck %s ; ; int mov(int a) ; {