[clang] [llvm] [DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (PR #90809)
S. Bharadwaj Yadavalli via cfe-commits
cfe-commits at lists.llvm.org
Mon May 6 10:27:10 PDT 2024
================
@@ -744,7 +744,7 @@ void codegen::setFunctionAttributes(StringRef CPU, StringRef Features,
Expected<std::unique_ptr<TargetMachine>>
codegen::createTargetMachineForTriple(StringRef TargetTriple,
CodeGenOptLevel OptLevel) {
- Triple TheTriple(TargetTriple);
+ Triple TheTriple(llvm::Triple::normalize(TargetTriple.str()));
----------------
bharadwajy wrote:
> It's a bit of a grey area because this function is only really used by testing tools but I don't think we should normalize here. If someone is running llvm-reduce or one of the fuzzers on a module with an invalid triple they may well be doing that intentionally.
OK. Deleted the call to `normalize()` and restored the MIR test.
https://github.com/llvm/llvm-project/pull/90809
More information about the cfe-commits
mailing list