HomePhabricator

[X86] Fold xor(truncate(xor(x,c1)),c2) -> xor(truncate(x),xor(truncate(c1),c2))

Authored by RKSimon on Apr 3 2021, 4:43 AM.

Description

[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.

Details

Committed
RKSimonApr 3 2021, 4:43 AM
Parents
rG34ec74907d26: [X86] Add PR47603 test case
Branches
Unknown
Tags
Unknown