[clang] [PPC] Disable vsx and altivec when -msoft-float is used (PR #100450)
Chen Zheng via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 24 18:53:55 PDT 2024
https://github.com/chenzheng1030 commented:
```
def FeatureFPU : SubtargetFeature<"fpu","HasFPU","true",
"Enable classic FPU instructions",
[FeatureHardFloat]>;
def FeatureAltivec : SubtargetFeature<"altivec","HasAltivec", "true",
"Enable Altivec instructions",
[FeatureFPU]>;
```
If `FeatureHardFloat` is false, `FeatureFPU` should be false and `FeatureAltivec` should be false too.
Seems we are lacking more handling in `PPCTargetInfo::setFeatureEnabled()`, for example, with this fix, -msoft-float disables vsx and altivec, but it does not disable `direct-move`, `power8-vector`....
https://github.com/llvm/llvm-project/pull/100450
More information about the cfe-commits
mailing list