[PATCH] D99984: [RISCV] Prevent __builtin_riscv_orc_b_64 from being compiled RV32 target.

Fraser Cormack via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 8 08:54:22 PDT 2021


frasercrmck accepted this revision.
frasercrmck added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:259
       .Case("riscv64", Is64Bit)
+      .Case("64bit", Is64Bit)
       .Case("m", HasM)
----------------
craig.topper wrote:
> frasercrmck wrote:
> > What's the difference between this new feature and `riscv64` above?
> The name I added to initFeatureMap has to match the feature name in RISCV.td because it will end up in the target-features attribute in IR.
> 
> SemaChecking just calls hasFeature, but CodeGenFunction also checks builtin features using the feature map. We check features in SemaChecking because the CodeGenFunction diagnostic isn’t phrased well for RISCV.
Ah I see, so since it has to match our `"64bit"` `SubtargetFeature` we can't reuse `"riscv64"`? Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99984/new/

https://reviews.llvm.org/D99984



More information about the cfe-commits mailing list