aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAmara Emerson <amara@apple.com>2020-09-29 14:39:54 -0700
committerAmara Emerson <amara@apple.com>2020-09-29 18:40:58 -0700
commit1d54e75cf26a4c60b66659d5d9c62f4bb9452b03 (patch)
treea4b3398dfcf6daf20811fb8b0c83de1428f5d997 /clang/lib/Frontend/CompilerInvocation.cpp
parent618a890b72f874cbc41168737d03f724f58805fc (diff)
downloadllvm-1d54e75cf26a4c60b66659d5d9c62f4bb9452b03.zip
llvm-1d54e75cf26a4c60b66659d5d9c62f4bb9452b03.tar.gz
llvm-1d54e75cf26a4c60b66659d5d9c62f4bb9452b03.tar.bz2
[GlobalISel] Fix multiply with overflow intrinsics legalization generating invalid MIR.
During lowering of G_UMULO and friends, the previous code moved the builder's insertion point to be after the legalizing instruction. When that happened, if there happened to be a "G_CONSTANT i32 0" immediately after, the CSEMIRBuilder would try to find that constant during the buildConstant(zero) call, and since it dominates itself would return the iterator unchanged, even though the def of the constant was *after* the current insertion point. This resulted in the compare being generated *before* the constant which it was using. There's no need to modify the insertion point before building the mul-hi or constant. Delaying moving the insert point ensures those are built/CSEd before the G_ICMP is built. Fixes PR47679 Differential Revision: https://reviews.llvm.org/D88514
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions