Commit Graph

29308 Commits

Author SHA1 Message Date
Sanjay Patel
e1f80841dd [AArch64] add tests with multiple binop+splat vals; NFC
See D60890 for context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358853 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-21 15:01:19 +00:00
Craig Topper
a83ee71394 [X86] Add the rounding control operand to the printing for some scalar FMA instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358844 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-21 07:12:56 +00:00
Amara Emerson
6de3f3796c Revert r358800. Breaks Obsequi from the test suite.
The last attempt fixed gcc and consumer-typeset, but Obsequi seems to fail with
a different issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358829 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-20 21:25:00 +00:00
Craig Topper
a5ce03ca59 [X86] Disable argument copy elision for arguments passed via pointers
Summary:
If you pass two 1024 bit vectors in IR with AVX2 on Windows 64. Both vectors will be split in four 256 bit pieces. The four pieces of the first argument will be passed indirectly using 4 gprs. The second argument will get passed via pointers in memory.

The PartOffsets stored for the second argument are all in terms of its original 1024 bit size. So the PartOffsets for each piece are 32 bytes apart. So if we consider it for copy elision we'll only load an 8 byte pointer, but we'll move the address 32 bytes. The stack object size we create for the first part is probably wrong too.

This issue was encountered by ISPC. I'm working on getting a reduce test case, but wanted to go ahead and get feedback on the fix.

Reviewers: rnk

Reviewed By: rnk

Subscribers: dbabokin, llvm-commits, hiraditya

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60801

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358817 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-20 15:26:44 +00:00
Nikita Popov
03d4298e86 [X86] Fix stack probing on x32 (PR41477)
Fix for https://bugs.llvm.org/show_bug.cgi?id=41477. On the x32 ABI
with stack probing a dynamic alloca will result in a WIN_ALLOCA_32
with a 32-bit size. The current implementation tries to copy it into
RAX, resulting in a physreg copy error. Fix this by copying to EAX
instead. Also fix incorrect opcodes or registers used in subs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358807 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-20 07:25:46 +00:00
Craig Topper
0428e2f205 [X86] Don't turn (and (shl X, C1), C2) into (shl (and X, (C1 >> C2), C2) if the original AND can represented by MOVZX.
The MOVZX doesn't require an immediate to be encoded at all. Though it does use
a 2 byte opcode so its the same size as a 1 byte immediate. But it has a
separate source and dest register so can help avoid copies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358805 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-20 04:38:53 +00:00
Craig Topper
02d9cc1a8e [X86] Turn (and (anyextend (shl X, C1), C2)) into (shl (and (anyextend X), (C1 >> C2), C2) if the AND could match a movzx.
There's one slight regression in here because we don't check that the immediate
already allowed movzx before the shift. I'll fix that next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358804 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-20 04:38:49 +00:00
Amara Emerson
acd8f7a0e5 Revert "Revert "[GlobalISel] Add legalization support for non-power-2 loads and stores""
We were shifting the wrong component of a split load when trying to combine them
back into a single value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 23:54:44 +00:00
Jessica Paquette
6b81ae837b [GlobalISel][AArch64] Legalize + select G_FRINT
Exactly the same as G_FCEIL, G_FABS, etc.

Add tests for the fp16/nofp16 behaviour, update arm64-vfloatintrinsics, etc.

Differential Revision: https://reviews.llvm.org/D60895

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358799 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 23:41:52 +00:00
Sam Clegg
5477ac9732 [WebAssembly] FastISel: Don't fallback to SelectionDAG after BuildMI in selectCall
My understanding is that once BuildMI has been called we can't fallback
to SelectionDAG.

This change moves the fallback for when getRegForValue() fails for
that target of an indirect call.  This was failing in -fPIC mode when
the callee is GlobalValue.

Add a test case that tickles this.

Differential Revision: https://reviews.llvm.org/D60908

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358793 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 22:43:32 +00:00
Jessica Paquette
2f0e14e02f [GlobalISel] Add IRTranslator support for G_FRINT
Add it as a simple intrinsic, update arm64-irtranslator.ll.

Differential Revision: https://reviews.llvm.org/D60893

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358787 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 21:46:12 +00:00
Jessica Paquette
b39bdec1f4 [GlobalISel] Add a G_FRINT opcode
Equivalent to SelectionDAG's frint node.

Differential Revision: https://reviews.llvm.org/D60891

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358785 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 21:44:16 +00:00
Craig Topper
2ed72ccbc3 [X86] Add test case for D60801. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358784 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 21:39:16 +00:00
Amy Huang
d01dcc9308 [MS] Emit S_HEAPALLOCSITE debug info
Summary:
This emits labels around heapallocsite calls and S_HEAPALLOCSITE debug
info in codeview. Currently only changes FastISel, so emitting labels still
needs to be implemented in SelectionDAG.

Reviewers: hans, rnk

Subscribers: aprantl, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D60800

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358783 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 21:09:11 +00:00
Amara Emerson
c41225db52 Revert "[GlobalISel] Add legalization support for non-power-2 loads and stores"
This introduces some runtime failures which I'll need to investigate further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358771 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 17:42:13 +00:00
Jessica Paquette
76a480bcb1 [GlobalISel][AArch64] Legalize vector G_FPOW
This instruction is legalized in the same way as G_FSIN, G_FCOS, G_FLOG10, etc.

Update legalize-pow.mir and arm64-vfloatintrinsics.ll to reflect the change.

Differential Revision: https://reviews.llvm.org/D60218

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358764 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 16:28:08 +00:00
Sanjay Patel
6c4fc48cdc [SelectionDAG] soften splat mask assert/unreachable (PR41535)
These are general queries, so they should not die when given
a degenerate input like an all undef mask. Callers should be
able to deal with an op that will eventually be simplified away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358761 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 15:31:11 +00:00
Simon Pilgrim
2df0acd2ff [AMDGPU] Regenerate extractelt->truncate test.
Prep work for D60462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358746 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 09:49:04 +00:00
Craig Topper
9bb76189e6 [X86] Turn (and (shl X, C1), C2) into (shl (and X, (C1 >> C2), C2) if the AND could match a movzx.
Could get further improvements by recognizing (i64 and (anyext (i32 shl))).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358737 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 05:48:13 +00:00
Craig Topper
f4c37ecc64 [X86] Add test cases for turning (and (shl X, C1), C2) into (shl (and X, (C1 >> C2), C2) when the AND could match to a movzx.
We already reorder when C1 >> C2 would allow a smaller immediate encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358736 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-19 05:48:09 +00:00
Sanjay Patel
ad6b84eda8 [AArch64] add tests for mul-by-element; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358718 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 21:48:46 +00:00
Jessica Paquette
f3a030510b [GlobalISel][AArch64] Legalize/select G_(S/Z/ANY)_EXT for v8s8s
This adds legalization for G_SEXT, G_ZEXT, and G_ANYEXT for v8s8s.

We were falling back on G_ZEXT in arm64-vabs.ll before, preventing us from
selecting the @llvm.aarch64.neon.sabd.v8i8 intrinsic.

This adds legalizer support for those 3, which gives us selection via the
importer. Update the relevant tests (legalize-ext.mir, select-int-ext.mir) and
add a GISel line to arm64-vabs.ll.

Differential Revision: https://reviews.llvm.org/D60881

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358715 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 21:15:48 +00:00
Jessica Paquette
d49ac7f542 [GlobalISel][AArch64] Legalize v8s8 loads
Add legalizer support for loads of v8s8 and update legalize-load-store.mir.

Differential Revision: https://reviews.llvm.org/D60877

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358714 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 21:13:58 +00:00
Simon Pilgrim
e3d0d4094b [X86] combineVectorTruncationWithPACKUS - remove split/concatenation of mask
combineVectorTruncationWithPACKUS is currently splitting the upper bit bit masking into 128-bit subregs and then concatenating them back together.

This was originally done to avoid regressions that caused existing subregs to be concatenated to the larger type just for the AND masking before being extracted again. This was fixed by @spatel (notably rL303997 and rL347356).

This also lets SimplifyDemandedBits do some further improvements before it hits the recursive depth limit.

My only annoyance with this is that we were broadcasting some xmm masks but we seem to have lost them by moving to ymm - but that's a known issue as the logic in lowerBuildVectorAsBroadcast isn't great.

Differential Revision: https://reviews.llvm.org/D60375#inline-539623

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358692 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 17:23:09 +00:00
Sanjay Patel
85c423e4be [x86] add tests for improved insertelement to index 0 (PR41512); NFC
Patch proposal in D60852.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358687 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 16:58:50 +00:00
Simon Pilgrim
c858d53094 [X86][SSE] Lower ICMP EQ(AND(X,C),C) -> SRA(SHL(X,LOG2(C)),BW-1) iff C is power-of-2.
This replaces the MOVMSK combine introduced at D52121/rL342326

(movmsk (setne (and X, (1 << C)), 0)) -> (movmsk (X << C))

with the more general icmp lowering so it can pick up more cases through bitcasts - notably vXi8 cases which use vXi16 shifts+masks, this patch can remove the mask and use pcmpgtb(0,x) for the sra.

Differential Revision: https://reviews.llvm.org/D60625

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358651 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 09:58:59 +00:00
Kang Zhang
a2c8107c80 [PowerPC] Fix wrong ElemSIze when calling isConsecutiveLS()
Summary:
This issue from the bugzilla: https://bugs.llvm.org/show_bug.cgi?id=41177

When the two operands for BUILD_VECTOR are same, we will get assert error.
llvm::SDValue combineBVOfConsecutiveLoads(llvm::SDNode*, llvm::SelectionDAG&):
Assertion `!(InputsAreConsecutiveLoads && InputsAreReverseConsecutive) &&
"The loads cannot be both consecutive and reverse consecutive."' failed.

This error caused by the wrong ElemSIze when calling isConsecutiveLS(). We
should use `getScalarType().getStoreSize();` to get the ElemSize instread of
 `getScalarSizeInBits() / 8`.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D60811


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358644 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 07:24:15 +00:00
Tim Renouf
fed299e82d [AMDGPU] Avoid DAG combining assert with fneg(fadd(A,0))
fneg combining attempts to turn it into fadd(fneg(A), fneg(0)), but
creating the new fadd folds to just fneg(A). When A has multiple uses,
this confuses it and you get an assert. Fixed.

Differential Revision: https://reviews.llvm.org/D60633

Change-Id: I0ddc9b7286abe78edc0cd8d734fdeb05ff09821c

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358640 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-18 05:27:01 +00:00
Sanjay Patel
495f55e172 [x86] try to widen 'shl' as part of LEA formation
The test file has pairs of tests that are logically equivalent:
https://rise4fun.com/Alive/2zQ

%t4 = and i8 %t1, 8
%t5 = zext i8 %t4 to i16
%sh = shl i16 %t5, 2
%t6 = add i16 %sh, %t0
=>
%t4 = and i8 %t1, 8
%sh2 = shl i8 %t4, 2
%z5 = zext i8 %sh2 to i16
%t6 = add i16 %z5, %t0

...so if we can fold the shift op into LEA in the 1st pattern, then we
should be able to do the same in the 2nd pattern (unnecessary 'movzbl'
is a separate bug I think).

We don't want to do this any sooner though because that would conflict
with generic transforms that try to narrow the width of the shift.

Differential Revision: https://reviews.llvm.org/D60789

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358622 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 22:38:51 +00:00
Amara Emerson
c85f346f99 [GlobalISel] Add legalization support for non-power-2 loads and stores
Legalize things like i24 load/store by splitting them into smaller power of 2 operations.

This matches how SelectionDAG handles these operations.

Differential Revision: https://reviews.llvm.org/D59971

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358613 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 21:30:07 +00:00
Nick Desaulniers
4fe807c808 [AsmPrinter] defer %c to base class for ARM, PPC, and Hexagon. NFC
Summary:
None of these derived classes do anything that the base class cannot.
If we remove these case statements, then the base class can handle them
just fine.

Reviewers: peter.smith, echristo

Reviewed By: echristo

Subscribers: nemanjai, javed.absar, eraman, kristof.beyls, hiraditya, kbarton, jsji, llvm-commits, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60803

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358603 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 18:22:48 +00:00
Sanjay Patel
ee018500ab [ARM] tighten test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358594 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 16:51:09 +00:00
Rhys Perry
788a809b3c AMDGPU: Force skip over SMRD, VMEM and s_waitcnt instructions
Summary: This fixes a large Dawn of War 3 performance regression with RADV from Mesa 19.0 to master which was caused by creating less code in some branches.

Reviewers: arsen, nhaehnle

Reviewed By: nhaehnle

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60824

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358592 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 16:31:52 +00:00
Sanjay Patel
78395fb2fe [ARM] make test checks more thorough; NFC
This will change with the proposal in D60214.
Unfortunately, the triple is not supported for auto-generation
via script, and the multiple RUN lines have diffs on this test,
but I can't tell exactly what is required by this test.
PR7162 was an assert/crash, so hopefully, this is good enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358587 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 16:02:07 +00:00
Craig Topper
12dfff8e72 [X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358556 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-17 06:09:16 +00:00
Sanjay Patel
12d487290a [x86] adjust LEA tests for better coverage; NFC
The scale can 1, 2, or 3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358539 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-16 23:10:41 +00:00
Simon Pilgrim
91de08f078 [X86][AVX] X86ISD::PERMV/PERMV3 node types can never fold index ops
Improves codegen demonstrated by D60512 - instructions represented by X86ISD::PERMV/PERMV3 can never memory fold the operand used for their index register.

This patch updates the 'isUseOfShuffle' helper into the more capable 'isFoldableUseOfShuffle' that recognises that the op is used for a X86ISD::PERMV/PERMV3 index mask and can't be folded - allowing us to use broadcast/subvector-broadcast ops to reduce the size of the mask constant pool data.

Differential Revision: https://reviews.llvm.org/D60562

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358516 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-16 19:18:53 +00:00
Sanjay Patel
577e9fbf52 [x86] add more tests for LEA formation; NFC
Promoting the shift to the wider type should allow LEA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358513 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-16 18:58:03 +00:00
Luis Marques
2ce77c86aa [RISCV] Custom lower SHL_PARTS, SRA_PARTS, SRL_PARTS
When not optimizing for minimum size (-Oz) we custom lower wide shifts
(SHL_PARTS, SRA_PARTS, SRL_PARTS) instead of expanding to a libcall.

Differential Revision: https://reviews.llvm.org/D59477


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358498 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-16 14:38:32 +00:00
Hans Wennborg
a2389c7d86 Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)
The original commit caused false positives from AddressSanitizer's
use-after-scope checks, which have now been fixed in r358478.

> The code was previously checking that candidates for sinking had exactly
> one use or were a store instruction (which can't have uses). This meant
> we could sink call instructions only if they had a use.
>
> That limitation seemed a bit arbitrary, so this patch changes it to
> "instruction has zero or one use" which seems more natural and removes
> the need to special-case stores.
>
> Differential revision: https://reviews.llvm.org/D59936

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358483 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-16 12:13:25 +00:00
Amara Emerson
fc6686218a [AArch64][GlobalISel] Don't do extending loads combine for non-pow-2 types.
Since non-pow-2 types are going to get split up into multiple loads anyway,
don't do the [SZ]EXTLOAD combine for those and save us trouble later in
legalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358458 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 22:34:08 +00:00
Craig Topper
cc4577dd5d [X86] Limit the 'x' inline assembly constraint to zmm0-15 when used for a 512 type.
The 'v' constraint is used to select zmm0-31. This makes 512 bit consistent with 128/256-bit.a

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358450 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 21:06:32 +00:00
Craig Topper
27331403cf [X86] Fix a stack folding test to have a full xmm2-31 clobber list instead of stopping at xmm15. Add an additional dependency to keep instruction below inline asm block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358449 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 21:06:23 +00:00
Matt Arsenault
91b4e08b81 AMDGPU: Fix unreachable when counting register usage of SGPR96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358447 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 20:51:12 +00:00
Matt Arsenault
c468ee9242 AMDGPU: Fix printed format of SReg_96
These are artificial, so I think this should only come up with inline
asm comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358446 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 20:42:18 +00:00
Craig Topper
b88655f4c4 [X86] Block i32/i64 for 'k' and 'Yk' in getRegForInlineAsmConstraint without avx512bw.
32 and 64 bit k-registers require avx512bw. If we don't block this properly, it leads to a crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358436 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 18:39:45 +00:00
Sanjay Patel
a739132fd3 [x86] update test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358432 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 17:38:47 +00:00
Craig Topper
592ca89b48 [X86] Restore the pavg intrinsics.
The pattern we replaced these with may be too hard to match as demonstrated by
PR41496 and PR41316.

This patch restores the intrinsics and then we can start focusing
on the optimizing the intrinsics.

I've mostly reverted the original patch that removed them. Though I modified
the avx512 intrinsics to not have masking built in.

Differential Revision: https://reviews.llvm.org/D60674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358427 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 17:17:35 +00:00
Yevgeny Rouban
964976f9b8 Codegen: Fixed perf branch_weights in couple of tests. NFC.
This is need to pass future checks of perf branch_weights metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358384 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 09:30:31 +00:00
Bjorn Pettersson
e8116c4ea8 [SelectionDAG] Use KnownBits::computeForAddSub/computeForAddCarry
Summary:
Use KnownBits::computeForAddSub/computeForAddCarry
in SelectionDAG::computeKnownBits when doing value
tracking for addition/subtraction.

This should improve the precision of the known bits,
as we only used to make a simple estimate of known
zeroes. The KnownBits support functions are also
able to deduce bits that are known to be one in the
result.

Reviewers: spatel, RKSimon, nikic, lebedev.ri

Reviewed By: nikic

Subscribers: nikic, javed.absar, lebedev.ri, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60460

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358372 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-15 07:19:11 +00:00