Skip to content

Commit b37c545

Browse files
committed
Missed an if around bitcast
1 parent 09916e5 commit b37c545

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,9 +781,7 @@ Value *LegalizeBufferContentTypesVisitor::makeIllegalNonAggregate(
781781
IRB.getIntNTy(DL.getTypeSizeInBits(LegalType).getFixedValue());
782782
Value *AsScalar = IRB.CreateBitCast(V, ByteScalarTy, Name + ".bytes.cast");
783783
Value *Trunc = IRB.CreateTrunc(AsScalar, ShortScalarTy, Name + ".trunc");
784-
if (OrigType != ShortScalarTy)
785-
return IRB.CreateBitCast(Trunc, OrigType, Name + ".orig");
786-
return Trunc;
784+
return IRB.CreateBitCast(Trunc, OrigType, Name + ".orig");
787785
}
788786
return IRB.CreateBitCast(V, OrigType, Name + ".real.ty");
789787
}

0 commit comments

Comments
 (0)