Page MenuHomePhabricator

[RISCV] Fold (select_cc (xor X, Y), 0, eq/ne, trueV, falseV) -> (select_cc X, Y, eq/ne, trueV, falseV)
ClosedPublic

Authored by craig.topper on Mar 6 2021, 2:51 PM.

Details

Summary

This pattern occurs when lowering for overflow operations
introduce an xor after select_cc has already been formed.

I had to rework another combine that looked for select_cc of an xor
with 1. That xor will now get combined away so we just need to
look for the RHS of the select_cc being 1.

Diff Detail

Unit TestsFailed

TimeTest
70 msx64 debian > Polly.Isl/CodeGen::param_div_div_div_2.ll
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen -polly-codegen-verify -polly-scops -analyze < /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/param_div_div_div_2.ll | FileCheck /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/param_div_div_div_2.ll
50 msx64 debian > Polly.Isl/CodeGen::scop_expander_insert_point.ll
Script: -- : 'RUN: at line 1'; opt -polly-process-unprofitable -polly-remarks-minimal -polly-use-llvm-names -polly-import-jscop-dir=/mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen -polly-codegen-verify -polly-codegen -S -polly-invariant-load-hoisting=true < /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/scop_expander_insert_point.ll | FileCheck /mnt/disks/ssd0/agent/llvm-project/polly/test/Isl/CodeGen/scop_expander_insert_point.ll

Event Timeline

craig.topper created this revision.Mar 6 2021, 2:51 PM
craig.topper requested review of this revision.Mar 6 2021, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2021, 2:51 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
luismarques accepted this revision.Mar 7 2021, 6:05 AM

Seems correct.

This revision is now accepted and ready to land.Mar 7 2021, 6:05 AM
This revision was landed with ongoing or failed builds.Mar 7 2021, 9:36 AM
This revision was automatically updated to reflect the committed changes.