Skip to content

Commit 78aa61d

Browse files
authored
[InstCombine] matchOrConcat - return Value* not Instruction* (#128921)
NFC to make it easier to use builders in the future that might constant fold etc.
1 parent 9a4320a commit 78aa61d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3072,8 +3072,7 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) {
30723072
}
30733073

30743074
/// Attempt to combine or(zext(x),shl(zext(y),bw/2) concat packing patterns.
3075-
static Instruction *matchOrConcat(Instruction &Or,
3076-
InstCombiner::BuilderTy &Builder) {
3075+
static Value *matchOrConcat(Instruction &Or, InstCombiner::BuilderTy &Builder) {
30773076
assert(Or.getOpcode() == Instruction::Or && "bswap requires an 'or'");
30783077
Value *Op0 = Or.getOperand(0), *Op1 = Or.getOperand(1);
30793078
Type *Ty = Or.getType();
@@ -3614,7 +3613,7 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
36143613
if (Instruction *Funnel = matchFunnelShift(I, *this))
36153614
return Funnel;
36163615

3617-
if (Instruction *Concat = matchOrConcat(I, Builder))
3616+
if (Value *Concat = matchOrConcat(I, Builder))
36183617
return replaceInstUsesWith(I, Concat);
36193618

36203619
if (Instruction *R = foldBinOpShiftWithShift(I))

0 commit comments

Comments
 (0)