Skip to content

Commit 9be6728

Browse files
committed
[InstCombine] Drop outdated alignment comment (NFC)
Loads always have an alignment now, so this is no longer relevant.
1 parent 8c51812 commit 9be6728

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,7 @@ Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) {
664664
return nullptr;
665665

666666
// When processing loads, we need to propagate two bits of information to the
667-
// sunk load: whether it is volatile, and what its alignment is. We currently
668-
// don't sink loads when some have their alignment specified and some don't.
669-
// visitLoadInst will propagate an alignment onto the load when TD is around,
670-
// and if TD isn't around, we can't handle the mixed case.
667+
// sunk load: whether it is volatile, and what its alignment is.
671668
bool isVolatile = FirstLI->isVolatile();
672669
Align LoadAlignment = FirstLI->getAlign();
673670
unsigned LoadAddrSpace = FirstLI->getPointerAddressSpace();
@@ -699,7 +696,7 @@ Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) {
699696
!isSafeAndProfitableToSinkLoad(LI))
700697
return nullptr;
701698

702-
LoadAlignment = std::min(LoadAlignment, Align(LI->getAlign()));
699+
LoadAlignment = std::min(LoadAlignment, LI->getAlign());
703700

704701
// If the PHI is of volatile loads and the load block has multiple
705702
// successors, sinking it would remove a load of the volatile value from

0 commit comments

Comments
 (0)