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) {
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
You can’t perform that action at this time.
0 commit comments