[llvm] [RISCV] Add short forward branch support for `min`, `max`, `maxu` and `minu` (PR #164394)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 22:56:07 PDT 2025


================
@@ -1850,6 +1850,10 @@ def TuneShortForwardBranchOpt
 def HasShortForwardBranchOpt : Predicate<"Subtarget->hasShortForwardBranchOpt()">;
 def NoShortForwardBranchOpt : Predicate<"!Subtarget->hasShortForwardBranchOpt()">;
 
+def TuneShortForwardBranchIMinMax
+    : SubtargetFeature<"short-forward-branch-i-minmax", "HasShortForwardBranchIMinMax",
+                       "true", "Enable short forward branch optimization for min,max instructions in Zbb", [TuneShortForwardBranchOpt]>;
----------------
hchandel wrote:

Done.

https://github.com/llvm/llvm-project/pull/164394


More information about the llvm-commits mailing list