[PATCH] D48557: [X86] Use XOR for SUB (C, X) during isel if will help fold an immediate

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 14:00:42 PDT 2018


spatel added a comment.

I agree with the direction. It's hard to generalize folds for select-of-constants even for x86 alone because there are so many weird cases.

I've made patches that do something like these:
https://rise4fun.com/Alive/Mwl

...but unraveling all of the regressions is painful.



================
Comment at: test/CodeGen/X86/extract-lowbits.ll:31
 define i32 @bzhi32_a0(i32 %val, i32 %numlowbits) nounwind {
-; X86-NOBMI-LABEL: bzhi32_a0:
-; X86-NOBMI:       # %bb.0:
----------------
This shouldn't be in the patch?


https://reviews.llvm.org/D48557





More information about the llvm-commits mailing list