[all-commits] [llvm/llvm-project] 2a27c0: [X86] Use BSR passthrough behaviour to fold (CMOV ...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Thu Jun 12 02:46:30 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2a27c059eccd96b6e46464dbdf69fd2f6237a56c
https://github.com/llvm/llvm-project/commit/2a27c059eccd96b6e46464dbdf69fd2f6237a56c
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2025-06-12 (Thu, 12 Jun 2025)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/bsr.ll
M llvm/test/CodeGen/X86/pr40090.ll
Log Message:
-----------
[X86] Use BSR passthrough behaviour to fold (CMOV (BSR ?, X), Y, (X == 0)) -> (BSR Y, X) (#143662)
Make use of targets that support BSR "pass through behaviour" on a zero input to remove a CMOV thats performing the same function
BSF will be a trickier patch as we need to make sure it works with the "REP BSF" hack in X86MCInstLower
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list