[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 08:51:51 PST 2024


================
@@ -2081,7 +2081,26 @@ void CodeGenFunction::EmitBranchOnBoolExpr(
     Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
   }
 
-  Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
+  auto *BrInst = Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights,
----------------
llvm-beanz wrote:

nit: https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
```suggestion
  llvm::Inst *BrInst = Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights,
```

https://github.com/llvm/llvm-project/pull/116331


More information about the llvm-commits mailing list