Skip to content

Commit ae39fbb

Browse files
committed
[FMT] running git clang format
1 parent ac1b070 commit ae39fbb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3654,30 +3654,31 @@ static bool hasAffectedValue(Value *V, SmallPtrSetImpl<Value *> &Affected,
36543654
// %any1 = uitofp i1 %any0 to float
36553655
// ```
36563656
// (also works with double)
3657-
static std::optional<Instruction*> mabyeFoldIntoCast(Value* CondVal, ConstantFP *TrueVal, ConstantFP *FalseVal, Type *SelType, llvm::StringRef out) {
3657+
static std::optional<Instruction *>
3658+
mabyeFoldIntoCast(Value *CondVal, ConstantFP *TrueVal, ConstantFP *FalseVal,
3659+
Type *SelType, llvm::StringRef out) {
36583660
if (TrueVal->getValueAPF().convertToDouble() != 1.0) {
3659-
return std::optional<Instruction*>();
3661+
return std::optional<Instruction *>();
36603662
}
36613663

36623664
if (FalseVal->getValueAPF().convertToDouble() != 0.0) {
3663-
return std::optional<Instruction*>();
3665+
return std::optional<Instruction *>();
36643666
}
36653667

36663668
return CastInst::Create(llvm::Instruction::UIToFP, CondVal, SelType, out);
36673669
}
36683670

3669-
36703671
Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
36713672
Value *CondVal = SI.getCondition();
36723673
Value *TrueVal = SI.getTrueValue();
36733674
Value *FalseVal = SI.getFalseValue();
36743675
Type *SelType = SI.getType();
36753676

3676-
36773677
if (ConstantFP *True = dyn_cast<ConstantFP>(TrueVal)) {
36783678
if (ConstantFP *False = dyn_cast<ConstantFP>(FalseVal)) {
36793679
if (SelType->isFloatTy() || SelType->isDoubleTy()) {
3680-
std::optional<Instruction*> folded = mabyeFoldIntoCast(CondVal, True, False, SelType, SI.getName());
3680+
std::optional<Instruction *> folded =
3681+
mabyeFoldIntoCast(CondVal, True, False, SelType, SI.getName());
36813682

36823683
if (folded.has_value()) {
36833684
return folded.value();

0 commit comments

Comments
 (0)