[all-commits] [llvm/llvm-project] 89afec: [X86] Fold xor(truncate(xor(x, c1)), c2) -> xor(trun...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Sat Apr 3 04:43:50 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 89afec348dbd3e5078f176e978971ee2d3b5dec8
https://github.com/llvm/llvm-project/commit/89afec348dbd3e5078f176e978971ee2d3b5dec8
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2021-04-03 (Sat, 03 Apr 2021)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/clz.ll
Log Message:
-----------
[X86] Fold xor(truncate(xor(x,c1)),c2) -> xor(truncate(x),xor(truncate(c1),c2))
Fixes PR47603
This should probably be transferable to DAGCombine - the main limitation with the existing trunc(logicop) DAG fold is we don't know if legalization has tried to promote truncated logicops already. We might be able to peek through extensions as well.
More information about the All-commits
mailing list