InstCombine: Pass AssumptionCache through isDereferenceablePointer

This commit is contained in:
Matt Arsenault 2022-09-19 15:59:13 -04:00
parent 34fb7803f8
commit fd37ab6cf6
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ Value *InstCombinerImpl::simplifyMaskedLoad(IntrinsicInst &II) {
// If we can unconditionally load from this address, replace with a // If we can unconditionally load from this address, replace with a
// load/select idiom. TODO: use DT for context sensitive query // load/select idiom. TODO: use DT for context sensitive query
if (isDereferenceablePointer(LoadPtr, II.getType(), if (isDereferenceablePointer(LoadPtr, II.getType(),
II.getModule()->getDataLayout(), &II, nullptr)) { II.getModule()->getDataLayout(), &II, &AC)) {
LoadInst *LI = Builder.CreateAlignedLoad(II.getType(), LoadPtr, Alignment, LoadInst *LI = Builder.CreateAlignedLoad(II.getType(), LoadPtr, Alignment,
"unmaskedload"); "unmaskedload");
LI->copyMetadata(II); LI->copyMetadata(II);