================
@@ -189,6 +201,9 @@ class DXILPrepareModule : public ModulePass {
       for (auto &BB : F) {
         IRBuilder<> Builder(&BB);
         for (auto &I : make_early_inc_range(BB)) {
+
+          I.dropUnknownNonDebugMetadata(DXILCompatibleMDs);
+
           if (I.getOpcode() == Instruction::FNeg) {
----------------
bogner wrote:

I agree. I think DXILPrepare should do things like translate attributes and 
metadata, insert no-op bitcasts to appease the bitcode writer, and that sort of 
thing. Replacing ops with their equivalents should squarely be a part of 
legalization, not here.

I've filed https://github.com/llvm/llvm-project/issues/137685

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

Reply via email to