[all-commits] [llvm/llvm-project] 5a7b79: [WebAssembly] Fix feature coalescing (#110647)

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Oct 15 00:35:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a7b79c93e2e0c71aec016973f5f13d3bb2e7a62
      https://github.com/llvm/llvm-project/commit/5a7b79c93e2e0c71aec016973f5f13d3bb2e7a62
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp

  Log Message:
  -----------
  [WebAssembly] Fix feature coalescing (#110647)

This fixes a problem introduced in #80094. That PR copied negative
features from the TargetMachine to the end of the feature string. This
is not correct, because even if we have a baseline TM of say `-simd128`,
but a function with `+simd128`, the coalesced feature string should have
`+simd128`, not `-simd128`.

To address the original motivation of that PR, we should instead
explicitly materialize the negative features in the target feature
string, so that explicitly disabled default features are honored.

Unfortunately, there doesn't seem to be any way to actually test this
using llc, because `-mattr` appends the specified features to the end of
the `"target-features"` attribute. I've tested this locally by making it
prepend the features instead.



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