[all-commits] [llvm/llvm-project] 0e2ebe: [RISC-V] Update streamer ArchString in emitTargetF...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Sat Sep 26 19:02:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e2ebe79f5c4ea36d7daecb76fb4867452d6973e
      https://github.com/llvm/llvm-project/commit/0e2ebe79f5c4ea36d7daecb76fb4867452d6973e
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2026-09-26 (Sat, 26 Sep 2026)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
    M llvm/test/CodeGen/RISCV/module-asm-features.ll
    M llvm/test/CodeGen/RISCV/riscv-func-target-feature.ll

  Log Message:
  -----------
  [RISC-V] Update streamer ArchString in emitTargetFeaturePush() (#225133)

Previously, RISCVAsmPrinter::emitTargetFeaturePush() only emitted `.option push`
and `.option arch` without updating the streamer's active ArchString. When
emitting an ELF object file directly (`-filetype=obj`),
RISCVTargetELFStreamer::emitDirectiveOptionArch() is a no-op while
emitTargetFeaturePop() resets ArchString back to the pushed ArchString, so
module-level inline assembly and functions with custom `target-features` failed
to emit updated `$x<arch>` mapping symbols.

Call RTS.setArchString() with the parsed ISA string in emitTargetFeaturePush()
so `-filetype=obj` records the active `$x<arch>` mapping symbol alongside
`.option arch`.

This commit was created with the help of AI tools

Pull-Request: https://github.com/llvm/llvm-project/pull/225133



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list