================
@@ -25,8 +25,8 @@ addi a0, a1, 0
 # CHECK: # encoding:  [0xe0,0x1f]
 addi s0, sp, 1020
 
-# CHECK: .option arch, -c
-.option arch, -c
+# CHECK: .option arch, -c, -zca
+.option arch, -c, -zca
----------------
topperc wrote:

The code for removing a feature doesn't even try to remove dependent features.

```
        assert(Type == RISCVOptionArchArgType::Minus);                          
 
        // It is invalid to disable an extension that there are other enabled   
 
        // extensions depend on it.                                             
 
        // TODO: Make use of RISCVISAInfo to handle this                        
 
        for (auto &Feature : RISCVFeatureKV) {                                  
 
          if (getSTI().hasFeature(Feature.Value) &&                             
 
              Feature.Implies.test(Ext->Value))                                 
 
            return Error(Loc, Twine("can't disable ") + Ext->Key +              
 
                                  " extension; " + Feature.Key +                
 
                                  " extension requires " + Ext->Key +           
 
                                  " extension");
```

https://github.com/llvm/llvm-project/pull/132259
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to