Skip to content

Commit 0113b25

Browse files
committed
fix format, fix undef in test
1 parent 9109280 commit 0113b25

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ Instruction *InstCombinerImpl::scalarizePHI(ExtractElementInst &EI,
153153
// non-commutative operations.
154154
Value *FirstOp = (B0->getOperand(0) == PN) ? scalarPHI : Op;
155155
Value *SecondOp = (B0->getOperand(0) == PN) ? Op : scalarPHI;
156-
Value *newPHIUser = InsertNewInstWith(
157-
BinaryOperator::CreateWithCopiedFlags(B0->getOpcode(),
158-
FirstOp, SecondOp, B0),
159-
B0->getIterator());
156+
Value *newPHIUser =
157+
InsertNewInstWith(BinaryOperator::CreateWithCopiedFlags(
158+
B0->getOpcode(), FirstOp, SecondOp, B0),
159+
B0->getIterator());
160160
scalarPHI->addIncoming(newPHIUser, inBB);
161161
} else {
162162
// Scalarize PHI input:

llvm/test/Transforms/InstCombine/scalarization.ll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ define void @scalarize_phi_sub(ptr %n, ptr %inout) {
130130
;
131131
entry:
132132
%t0 = load volatile float, ptr %inout, align 4
133-
%insert = insertelement <4 x float> undef, float %t0, i32 0
134-
%splat = shufflevector <4 x float> %insert, <4 x float> undef, <4 x i32> zeroinitializer
135-
%insert1 = insertelement <4 x float> undef, float 3.0, i32 0
133+
%insert = insertelement <4 x float> poison, float %t0, i32 0
134+
%splat = shufflevector <4 x float> %insert, <4 x float> poison, <4 x i32> zeroinitializer
136135
br label %for.cond
137136

138137
for.cond:

0 commit comments

Comments
 (0)