Skip to content

Commit

Permalink
Fix invalid bitcast in SROA
Browse files Browse the repository at this point in the history
  • Loading branch information
yxsamliu authored and scchan committed Jun 20, 2017
1 parent cc372bd commit 363dd5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Transforms/Scalar/SROA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ static Value *getAdjustedPtr(IRBuilderTy &IRB, const DataLayout &DL, Value *Ptr,

if (!OffsetPtr) {
if (!Int8Ptr) {
Int8Ptr = IRB.CreateBitCast(
Int8Ptr = IRB.CreatePointerBitCastOrAddrSpaceCast(
Ptr, IRB.getInt8PtrTy(PointerTy->getPointerAddressSpace()),
NamePrefix + "sroa_raw_cast");
Int8PtrOffset = Offset;
Expand Down

0 comments on commit 363dd5c

Please sign in to comment.