[PATCH] D122084: [X86] combineAddOrSubToADCOrSBB - Fold ADD/SUB + (AND(SRL(X,Y),1) -> ADC/SBB+BT(X,Y)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 20 03:22:36 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/add-sub-bool.ll:129
 
 define i32 @test_i32_sub_sub_idx(i32 %x, i32 %y, i32 %z) {
 ; X86-LABEL: test_i32_sub_sub_idx:
----------------
RKSimon wrote:
> pengfei wrote:
> > So the test actually tests for `%x - (%y - bool(%z & (1 << 30))`? The name seems misleading which implies it tests for `test_sub` in PR35256.
> Sorry, I was trying to test all permutations of the adds/subs to see whether any folds stall further optimizations. I'll update the comment at the top.
Ah - this is actually testing another yet combo, not the basic SBB pattern - I'll address this later


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122084/new/

https://reviews.llvm.org/D122084



More information about the llvm-commits mailing list