aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-10-17 15:43:11 +0200
committerNikita Popov <npopov@redhat.com>2022-10-17 15:52:38 +0200
commitac74e7a7806480a000c9a3502405c3dedd8810de (patch)
treeb2b3118f68b4bb7869cdb816188a68d640addc81 /clang/lib/Basic/Module.cpp
parentc4331358fb9de83289b2638a77e8e08e41f56860 (diff)
downloadllvm-ac74e7a7806480a000c9a3502405c3dedd8810de.zip
llvm-ac74e7a7806480a000c9a3502405c3dedd8810de.tar.gz
llvm-ac74e7a7806480a000c9a3502405c3dedd8810de.tar.bz2
[InstSimplify] Only check self-simplify in simplifyInstruction()
InstSimplify currently checks whether the instruction simplifies back to itself, and returns undef in that case. Generally, this should only occur in unreachable code. However, this was also done for the simplifyInstructionWithOperands() API. In that case, the instruction only serves as a template that provides the opcode and other non-operand data. In this case, simplifying back to the same "instruction" may be expected. This caused PR58401 in conjunction with D134954. As such, move this check into simplifyInstruction() only. The only other caller of simplifyInstructionWithOperands() also handles the self-simplification case explicitly.
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
0 files changed, 0 insertions, 0 deletions