File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -664,10 +664,7 @@ Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) {
664
664
return nullptr ;
665
665
666
666
// 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.
671
668
bool isVolatile = FirstLI->isVolatile ();
672
669
Align LoadAlignment = FirstLI->getAlign ();
673
670
unsigned LoadAddrSpace = FirstLI->getPointerAddressSpace ();
@@ -699,7 +696,7 @@ Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) {
699
696
!isSafeAndProfitableToSinkLoad (LI))
700
697
return nullptr ;
701
698
702
- LoadAlignment = std::min (LoadAlignment, Align ( LI->getAlign () ));
699
+ LoadAlignment = std::min (LoadAlignment, LI->getAlign ());
703
700
704
701
// If the PHI is of volatile loads and the load block has multiple
705
702
// successors, sinking it would remove a load of the volatile value from
You can’t perform that action at this time.
0 commit comments