Page MenuHomePhabricator

[WIP][SDag] Allow targets to simplify generic nodes using demanded bits info
Needs ReviewPublic

Authored by foad on Oct 22 2020, 7:35 AM.
This revision needs review, but there are no reviewers specified.



Diff Detail

Unit TestsFailed

390 mslinux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mcmodel=large -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/hwasan/TestCases/sizes.cpp -nostdlib++ -lstdc++ -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/sizes.cpp.tmp

Event Timeline

foad created this revision.Oct 22 2020, 7:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2020, 7:35 AM
foad requested review of this revision.Oct 22 2020, 7:35 AM

Much like with a similar InstCombine question, i'm on the edge about this.


I think you want to instead add a computeKnownBitsUsingTargetKnowledge()

An alternative I thought of is to add a target hook to ShrinkDemandedOp similar to the one we have in ShrinkDemandedConstant. Or might be able to just make ShrinkDemandedOp virtual?