================ @@ -3964,6 +3964,8 @@ Value *ScalarExprEmitter::EmitRem(const BinOpInfo &Ops) { if (Ops.Ty->hasUnsignedIntegerRepresentation()) return Builder.CreateURem(Ops.LHS, Ops.RHS, "rem"); + else if (CGF.getLangOpts().HLSL && Ops.Ty->hasFloatingRepresentation()) + return Builder.CreateFRem(Ops.LHS, Ops.RHS, "rem"); else ---------------- llvm-beanz wrote:
I know this steps a little out from the code you're changing, but it would be a nice cleanup (https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return). ```suggestion if (CGF.getLangOpts().HLSL && Ops.Ty->hasFloatingRepresentation()) return Builder.CreateFRem(Ops.LHS, Ops.RHS, "rem"); ``` https://github.com/llvm/llvm-project/pull/135125 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits