Commit 2026789
committed
[WebAssembly] Fix feature coalescing
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 must have `+simd128`, not `-sidm128`.
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.1 parent e2a855d commit 2026789
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
| |||
241 | 240 | | |
242 | 241 | | |
243 | 242 | | |
244 | | - | |
245 | | - | |
| 243 | + | |
246 | 244 | | |
247 | 245 | | |
248 | 246 | | |
249 | 247 | | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | 251 | | |
256 | 252 | | |
257 | 253 | | |
| |||
0 commit comments