diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-11-21 12:55:29 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-11-21 12:55:29 +0000 |
| commit | f65bf063bcac0dcdca7d3b7b865e29c837566543 (patch) | |
| tree | 2b5bd79e99c9aeed4082427ad8ae0f70b8852d6c /llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp | |
| parent | efdccd8358633400f927c74be0f7969bda1b3775 (diff) | |
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp index 86411320ab24..b05a33c68889 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp @@ -513,7 +513,8 @@ Instruction *InstCombinerImpl::foldPHIArgGEPIntoPHI(PHINode &PN) { // especially bad when the PHIs are in the header of a loop. bool NeededPhi = false; - GEPNoWrapFlags NW = GEPNoWrapFlags::all(); + // Remember flags of the first phi-operand getelementptr. + GEPNoWrapFlags NW = FirstInst->getNoWrapFlags(); // Scan to see if all operands are the same opcode, and all have one user. for (Value *V : drop_begin(PN.incoming_values())) { |
