[all-commits] [llvm/llvm-project] 8bfb2b: [SPIR-V] Remove switch G_ICMP+G_BRCOND+G_BR before...
Michal Paszkowski via All-commits
all-commits at lists.llvm.org
Tue Apr 4 14:54:19 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8bfb2b6d771ce1aa817b621bc922c1ab92eda034
https://github.com/llvm/llvm-project/commit/8bfb2b6d771ce1aa817b621bc922c1ab92eda034
Author: Michal Paszkowski <michal.paszkowski at outlook.com>
Date: 2023-04-04 (Tue, 04 Apr 2023)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
M llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
M llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.h
M llvm/lib/Target/SPIRV/SPIRVPreLegalizer.cpp
A llvm/test/CodeGen/SPIRV/branching/OpSwitch32.ll
A llvm/test/CodeGen/SPIRV/branching/OpSwitch64.ll
A llvm/test/CodeGen/SPIRV/branching/OpSwitchBranches.ll
A llvm/test/CodeGen/SPIRV/branching/OpSwitchChar.ll
A llvm/test/CodeGen/SPIRV/branching/OpSwitchEmpty.ll
A llvm/test/CodeGen/SPIRV/branching/OpSwitchUnreachable.ll
A llvm/test/CodeGen/SPIRV/branching/Two_OpSwitch_same_register.ll
R llvm/test/CodeGen/SPIRV/transcoding/OpSwitch32.ll
R llvm/test/CodeGen/SPIRV/transcoding/OpSwitch64.ll
R llvm/test/CodeGen/SPIRV/transcoding/OpSwitchChar.ll
R llvm/test/CodeGen/SPIRV/transcoding/OpSwitchEmpty.ll
R llvm/test/CodeGen/SPIRV/transcoding/OpSwitchUnreachable.ll
R llvm/test/CodeGen/SPIRV/transcoding/Two_OpSwitch_same_register.ll
Log Message:
-----------
[SPIR-V] Remove switch G_ICMP+G_BRCOND+G_BR before ISel
IRTranslator lowers switches to [G_SUB] + G_ICMP + G_BRCOND + G_BR
sequences. Since values and destination MBBs are included in the
spv_switch intrinsics, the sequences are not needed for ISel.
Before this commit, the information decoded by these sequences were
added to spv_switch intrinsics in SPIRVPreLegalizer and the sequences
were kept until SPIRVModuleAnalysis where they were marked skipped for
emission.
After this commit, the [G_SUB] + G_ICMP + G_BRCOND + G_BR sequences
and MBBs containing only these MIs are erased in SPIRVPreLegalizer.
Differential Revision: https://reviews.llvm.org/D146923
More information about the All-commits
mailing list