aboutsummaryrefslogtreecommitdiff
path: root/clang/test/ParserOpenACC/parse-wait-construct.c
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2023-12-07 13:20:36 -0800
committerGitHub <noreply@github.com>2023-12-07 13:20:36 -0800
commitffb2af3ed6a95a4eb55b81a3d1351d5d4bd66eb5 (patch)
tree137d1dcd340ecb325050a7438789e460676f1f6b /clang/test/ParserOpenACC/parse-wait-construct.c
parente87f33d9ce785668223c3bcc4e06956985cccda1 (diff)
downloadllvm-ffb2af3ed6a95a4eb55b81a3d1351d5d4bd66eb5.zip
llvm-ffb2af3ed6a95a4eb55b81a3d1351d5d4bd66eb5.tar.gz
llvm-ffb2af3ed6a95a4eb55b81a3d1351d5d4bd66eb5.tar.bz2
[SCEVExpander] Attempt to reinfer flags dropped due to CSE (#72431)
LSR uses SCEVExpander to generate induction formulas. The expander internally tries to reuse existing IR expressions. To do that, it needs to strip any poison generating flags (nsw, nuw, exact, nneg, etc..) which may not be valid for the newly added users. This is conservatively correct, but has the effect that LSR will strip nneg flags on zext instructions involved in trip counts in loop preheaders. To avoid this, this patch adjusts the expanded to reinfer the flags on the CSE candidate if legal for all possible users. This should fix the regression reported in https://github.com/llvm/llvm-project/issues/71200. This should arguably be done inside canReuseInstruction instead, but doing it outside is more conservative compile time wise. Both canReuseInstruction and isGuaranteedNotToBePoison walk operand lists, so right now we are performing work which is roughly O(N^2) in the size of the operand graph. We should fix that before making the per operand step more expensive. My tenative plan is to land this, and then rework the code to sink the logic into more core interfaces.
Diffstat (limited to 'clang/test/ParserOpenACC/parse-wait-construct.c')
0 files changed, 0 insertions, 0 deletions