[PATCH] D108840: [WebAssembly] Fix FastISel of condition in different block (PR51651)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 27 13:26:06 PDT 2021
nikic created this revision.
nikic added reviewers: tlively, aheejin.
Herald added subscribers: ecnelises, pengfei, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
If the icmp is in a different block, then the register for the icmp operand may not be initialized, as it nominally does not have cross-block uses. Add a check that the icmp is in the same block as the branch, which should be the common case.
This matches what X86 FastISel does: https://github.com/llvm/llvm-project/blob/5b6b090cf2129228f05d7d0f504676b67f7524cf/llvm/lib/Target/X86/X86FastISel.cpp#L1648
Fixes https://bugs.llvm.org/show_bug.cgi?id=51651.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108840
Files:
llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
llvm/test/CodeGen/WebAssembly/pr51651.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108840.369170.patch
Type: text/x-patch
Size: 3645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210827/645935c5/attachment.bin>
More information about the llvm-commits
mailing list