================
@@ -18709,6 +18709,25 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned 
BuiltinID,
         CGM.getHLSLRuntime().getNormalizeIntrinsic(), ArrayRef<Value *>{X},
         nullptr, "hlsl.normalize");
   }
+  case Builtin::BI__builtin_hlsl_elementwise_fmod: {
+    Value *Op0 = EmitScalarExpr(E->getArg(0));
+    Value *Op1 = EmitScalarExpr(E->getArg(1));
+    if (!E->getArg(0)->getType()->hasFloatingRepresentation() ||
+        (E->getArg(0)->getType() != E->getArg(1)->getType()))
+      llvm_unreachable("fmod operands must have the same float 
representation");
+
+    llvm::Triple::ArchType Arch = CGM.getTarget().getTriple().getArch();
----------------
farzonl wrote:

This is just and FYI because I expect to see this whole block removed, but we 
don't do this for target switching we us the 
`CGM.getHLSLRuntime().get<intrinsic_name>Intrinsic()`

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

Reply via email to