[llvm] [SPIR-V] Add pre-headers to loops. (PR #75844)
Ilia Diachkov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 11:13:20 PST 2024
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/75844 at github.com>
================
@@ -587,6 +587,40 @@ static void processSwitches(MachineFunction &MF, SPIRVGlobalRegistry *GR,
}
}
+static bool isImplicitFallthrough(MachineBasicBlock &MBB) {
+ if (MBB.empty())
+ return true;
+
+ // Branching spirv intrinsics are not detected by this generic method.
+ // Thus, we can only trust negative result.
+ if (!MBB.canFallThrough())
+ return false;
+
+ // Otherwise, we must manually check if we have a spirv intrinsic which
----------------
iliya-diyachkov wrote:
The same
https://github.com/llvm/llvm-project/pull/75844
More information about the llvm-commits
mailing list