File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3266,13 +3266,26 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
32663266 }
32673267 if (auto *SI = dyn_cast<StoreInst>(Curr)) {
32683268 auto *PtrOpI = dyn_cast<Instruction>(SI->getPointerOperand ());
3269- if (PtrOpI && WorkList.contains (PtrOpI) &&
3269+ if ((SI-> getPointerOperand () == RK. WasOn || ( PtrOpI && WorkList.contains (PtrOpI)) ) &&
32703270 SI->getAlign ().value () < RK.ArgValue ) {
32713271 CanUseAlign = true ;
32723272 break ;
32733273 }
32743274 continue ;
32753275 }
3276+ if (auto *II = dyn_cast<IntrinsicInst>(Curr)) {
3277+ for (const auto &[Idx, Arg] : enumerate(II->args ())) {
3278+ if (Arg != RK.WasOn )
3279+ continue ;
3280+ if (II->getParamAlign (Idx) >= RK.ArgValue )
3281+ continue ;
3282+ CanUseAlign = true ;
3283+ break ;
3284+ }
3285+ if (CanUseAlign)
3286+ break ;
3287+ continue ;
3288+ }
32763289 if (isa<ReturnInst, CallBase>(Curr)) {
32773290 CanUseAlign = true ;
32783291 break ;
You can’t perform that action at this time.
0 commit comments