Skip to content

Commit 9ec02bf

Browse files
committed
[SROA][wip] Smoke test for rewriteIntegerLoad freeze_bits propagation
1 parent c7ccc54 commit 9ec02bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,9 @@ class AllocaSliceRewriter : public InstVisitor<AllocaSliceRewriter, bool> {
28622862
<< "SROA: Function seen <-------------------------\n";);
28632863

28642864
bool isFreezingLoad{true};
2865-
if (NewAI.getAllocatedType() == LI.getType())
2865+
if (NewAI.getAllocatedType() == LI.getType() ||
2866+
(NewAI.getAllocatedType()->isPointerTy() &&
2867+
LI.getType()->isIntegerTy()))
28662868
isFreezingLoad = loadHasFreezeBits(&LI);
28672869
Value *V = IRB.CreateAlignedLoad(NewAI.getAllocatedType(), &NewAI,
28682870
NewAI.getAlign(), "load",

0 commit comments

Comments
 (0)