craig.topper (Craig Topper)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 30 2013, 7:58 PM (199 w, 1 d)

Recent Activity

Today

craig.topper updated the diff for D33530: [SelectionDAG] Set ISD::FPOWI to Expand by default.

Update Hexagon and WebAssembly targets too

Wed, May 24, 7:00 PM
craig.topper added a comment to D33530: [SelectionDAG] Set ISD::FPOWI to Expand by default.

I missed them because I grepped for setOperationAction(ISD::FPOWI

Wed, May 24, 6:36 PM
craig.topper created D33530: [SelectionDAG] Set ISD::FPOWI to Expand by default.
Wed, May 24, 6:18 PM
craig.topper added a comment to D33262: [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4) .

@reames where you able to take a look at this?

Wed, May 24, 3:27 PM
craig.topper added a reviewer for D32319: Add constrained intrinsics for some libm-equivalent operations: craig.topper.
Wed, May 24, 2:35 PM
craig.topper added inline comments to D32319: Add constrained intrinsics for some libm-equivalent operations.
Wed, May 24, 2:34 PM
craig.topper added inline comments to D32669: [Nios2] Target registration.
Wed, May 24, 1:55 PM
craig.topper added a comment to D33356: [Nios2] Changes in frontend to support Nios2 LLVM target.

Is there enough functional here that there should be tests for? i.e. make sure march/mcpu switches are recognized, that the target is recognized, etc.

Wed, May 24, 1:40 PM
craig.topper added inline comments to D33169: [X86] Adding vpopcntd and vpopcntq instructions.
Wed, May 24, 8:16 AM

Yesterday

craig.topper added a comment to D32098: [InstCombine] Use less bitwise operations to handle Instruction::SExt in SimplifyDemandedUseBits. Other improvements..

Ping

Tue, May 23, 4:44 PM
craig.topper created D33473: [InstSimplify] Simplify uadd/sadd/umul/smul with overflow intrinsics when the Zero or Undef is on the LHS..
Tue, May 23, 4:27 PM
craig.topper updated the diff for D32582: [InstCombine] Add range metadata to cttz/ctlz/ctpop intrinsic calls based on known bits.

Add tests and support for ctpop

Tue, May 23, 10:22 AM
craig.topper planned changes to D32582: [InstCombine] Add range metadata to cttz/ctlz/ctpop intrinsic calls based on known bits.
Tue, May 23, 9:19 AM

Mon, May 22

craig.topper created D33431: [ValueTracking] Convert most of the calls to computeKnownBits to use the version that returns the KnownBits obje.
Mon, May 22, 11:57 PM
craig.topper created D33425: [ValueTracking] Expose the computeKnownBits Query structure.
Mon, May 22, 5:43 PM
craig.topper planned changes to D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..
Mon, May 22, 11:50 AM
craig.topper added a reviewer for D33136: [ValueTracking] Don't let isAddOfNonZero look at adds with a PHI node as input: hfinkel.
Mon, May 22, 11:49 AM
craig.topper added a comment to D32672: [ConstantRange] Remove costly udivrem from ConstantRange::truncate.

Ping x2

Mon, May 22, 11:46 AM
craig.topper accepted D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics.

LGTM

Mon, May 22, 10:05 AM

Sun, May 21

craig.topper accepted D33377: [InstCombine] Cleanup the interface for overflow checks.

Forgot to click accept earlier

Sun, May 21, 5:40 PM
craig.topper added a comment to D33377: [InstCombine] Cleanup the interface for overflow checks.

LGTM

Sun, May 21, 10:57 AM
craig.topper added inline comments to D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics.
Sun, May 21, 12:59 AM

Fri, May 19

craig.topper updated the diff for D33310: [APInt] Add support for dividing or remainder by a uint64_t or int64_t..

Add tests. Remove braces.

Fri, May 19, 12:40 AM

Thu, May 18

craig.topper created D33331: [InstSimplify] Make m_Not work for xor -1, X.
Thu, May 18, 11:51 AM
craig.topper added inline comments to D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics.
Thu, May 18, 9:36 AM

Wed, May 17

craig.topper added a comment to D33310: [APInt] Add support for dividing or remainder by a uint64_t or int64_t..

Forgot to mention, we should look into merging divide and tcDivide in the future.

Wed, May 17, 11:27 PM
craig.topper created D33310: [APInt] Add support for dividing or remainder by a uint64_t or int64_t..
Wed, May 17, 11:26 PM
craig.topper planned changes to D33306: [IfConversion] Make the ifcvt-limit command line option work at the function level and remove compares with global Statistic variables.
Wed, May 17, 9:12 PM
craig.topper added a comment to D33306: [IfConversion] Make the ifcvt-limit command line option work at the function level and remove compares with global Statistic variables.

Maybe we should switch to a DebugCounter?

Wed, May 17, 8:56 PM
craig.topper created D33306: [IfConversion] Make the ifcvt-limit command line option work at the function level and remove compares with global Statistic variables.
Wed, May 17, 6:50 PM
craig.topper created D33301: [Statistics] Add a method to atomically update a statistic that contains a maximum.
Wed, May 17, 3:43 PM
craig.topper added inline comments to D32669: [Nios2] Target registration.
Wed, May 17, 1:02 PM

Tue, May 16

craig.topper updated the diff for D33262: [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4) .

Change test case to be the output after InstCombine.

Tue, May 16, 10:47 PM
craig.topper created D33262: [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4) .
Tue, May 16, 3:45 PM
craig.topper updated the diff for D33136: [ValueTracking] Don't let isAddOfNonZero look at adds with a PHI node as input.

I couldn't come up with a bool variable name that I liked so I just taught BasicAA not to call isKnownNonEqual if one of the inputs is a PHI. Instead we'll just compute the known bits separately. I think we should add a helper method to KnownBits to check if two KnownBits structs are known non equal which would simplify the intersection check.

Tue, May 16, 11:22 AM
craig.topper added inline comments to D33247: [InstCombine] add isCanonicalPredicate() helper function and use it; NFCI.
Tue, May 16, 11:08 AM
craig.topper added a comment to D32712: [ConstantRange] Reduce the number of allocations in ConstantRange::makeGuaranteedNoWrapRegion.

This was based on reviewing the output of callgrind on one file and seeing what places create a lot of wider than 64-bit APInts. I can try to collect a larger data set of real numbers.

Tue, May 16, 11:05 AM
craig.topper added a comment to D32241: Don't process debug intrinsics in InstCombine.

I'm happy.

Tue, May 16, 10:47 AM

Mon, May 15

craig.topper added inline comments to D33169: [X86] Adding vpopcntd and vpopcntq instructions.
Mon, May 15, 2:33 PM
craig.topper added inline comments to D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics.
Mon, May 15, 2:32 PM
craig.topper updated subscribers of D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics.
Mon, May 15, 2:24 PM
craig.topper added a comment to D33169: [X86] Adding vpopcntd and vpopcntq instructions.

Disassembler tests?

I believe that the test test/MC/X86/x86-64-avx512vpopcntdq.s covers the required tests.
If you think additional tests are required i will appreciate an example.

I don't think the MC tests actually use the disassembler code to try and get back to the instruction - @craig.topper can you confirm?

Mon, May 15, 2:23 PM
craig.topper added a comment to D33169: [X86] Adding vpopcntd and vpopcntq instructions.

Do we have a generic ctpop test like we do for tzcnt and lzcnt? If so should we just add command lines to that instead of a new intrinsic test?

Mon, May 15, 1:29 PM
craig.topper updated the diff for D32712: [ConstantRange] Reduce the number of allocations in ConstantRange::makeGuaranteedNoWrapRegion.

Add a new subsetIntersectWith method that doesn't rely on inverting and calling unionWith.

Mon, May 15, 12:19 AM

Sun, May 14

craig.topper added inline comments to D33166: [ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits..
Sun, May 14, 7:44 PM
craig.topper added a comment to D33169: [X86] Adding vpopcntd and vpopcntq instructions.

Can you add vpopcnt command lines to test/CodeGen/X86/vector-tzcnt-*.ll as well. I believe we create ctpop nodes as part of cttz lowering that are currently expanding to a lookup table implementation.

Sun, May 14, 10:12 AM
craig.topper added inline comments to D33169: [X86] Adding vpopcntd and vpopcntq instructions.
Sun, May 14, 9:08 AM
craig.topper added a comment to D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics.

Looks like gcc already implements this https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg156421.html

Sun, May 14, 8:58 AM

Sat, May 13

craig.topper created D33166: [ValueTracking] Replace all uses of ComputeSignBit with computeKnownBits..
Sat, May 13, 10:49 PM
craig.topper accepted D32946: [InstCombine] Merge duplicate functionality between InstCombine and ValueTracking.

LGTM

Sat, May 13, 10:39 PM

Fri, May 12

craig.topper created D33154: [APInt] Add early outs for a division by 1 to udiv/urem/udivrem.
Fri, May 12, 2:31 PM
craig.topper added a comment to D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..

Yeah I think we should. That failure only showed up when I was rebasing. Is that something I should look into?

Fri, May 12, 2:13 PM
craig.topper added a comment to D32453: [InstCombine] Prevent InstCombine from triggering an extra iteration if something changed in the initial Worklist creation.

Ping!

Fri, May 12, 11:56 AM
craig.topper updated the diff for D32098: [InstCombine] Use less bitwise operations to handle Instruction::SExt in SimplifyDemandedUseBits. Other improvements..

Rebase

Fri, May 12, 11:55 AM
craig.topper abandoned D30922: [Builtins] Synchronize the definition of fma/fmaf/fmal in Builtins.def with the implementation in CGBuiltins.cpp.
Fri, May 12, 11:28 AM
craig.topper abandoned D32446: [SimplifyCFG] Use getSingleSuccessor() to simplify some code.
Fri, May 12, 11:28 AM
craig.topper added a comment to D32273: [X86][AVX512] Make i1 illegal in the CodeGen.

I think this looks ok to me. @RKSimon what do you think?

Fri, May 12, 11:25 AM
craig.topper added inline comments to D32684: [X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables..
Fri, May 12, 11:15 AM
craig.topper added inline comments to D32319: Add constrained intrinsics for some libm-equivalent operations.
Fri, May 12, 10:28 AM
craig.topper abandoned D32508: [ValueTracking] Begin adding some useful methods to the proposed KnownBits struct.
Fri, May 12, 9:37 AM
craig.topper created D33136: [ValueTracking] Don't let isAddOfNonZero look at adds with a PHI node as input.
Fri, May 12, 9:32 AM

Thu, May 11

craig.topper created D33116: [APInt] Use MathExtras.h BitsToFloat/Double and Float/DoubleToBits instead of type punning through a union.
Thu, May 11, 11:33 PM
craig.topper updated the diff for D33073: [APInt] Add a utility method to change the bit width and storage size of an APInt..

Rename to reallocate. Clarify comments.

Thu, May 11, 9:55 AM
craig.topper added 1 commit(s) for D33057: [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says: rL302717: [ConstantRange] Fix the early out in ConstantRange::multiply for positive….
Thu, May 11, 9:25 AM
craig.topper added an edge to rL302717: [ConstantRange] Fix the early out in ConstantRange::multiply for positive…: D33057: [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says.
Thu, May 11, 9:25 AM
craig.topper closed D33057: [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says.
Thu, May 11, 9:24 AM
craig.topper added a comment to D33057: [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says.

Committed in r302717, but forgot to include the Differential Revision line

Thu, May 11, 9:23 AM

Wed, May 10

craig.topper created D33073: [APInt] Add a utility method to change the bit width and storage size of an APInt..
Wed, May 10, 2:42 PM
craig.topper added a comment to D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..

Correction, the combine-and problem seems to be because SimplifyDemandedBits only considers scalar constants for shift amount, not constant splats from a build_vector.

Wed, May 10, 12:51 PM
craig.topper updated the diff for D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..

Rebase for recent changes.

Wed, May 10, 12:43 PM
craig.topper added a comment to D32712: [ConstantRange] Reduce the number of allocations in ConstantRange::makeGuaranteedNoWrapRegion.

Ping

Wed, May 10, 12:23 PM
craig.topper added a comment to D32672: [ConstantRange] Remove costly udivrem from ConstantRange::truncate.

Ping

Wed, May 10, 12:23 PM
craig.topper created D33057: [ConstantRange] Fix the early out in ConstantRange::multiply for positive numbers to really do what the comment says.
Wed, May 10, 12:10 PM

Tue, May 9

craig.topper added a comment to D32605: Recognize CTLZ builtin.

The target independent lowering code emits this for CTLZ when its not supported. I think the popcount expands to this http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel if its not supported. So there shouldn't be a libcall unless the target is changing the default behavior.

Tue, May 9, 2:55 PM
craig.topper added a comment to D32684: [X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables..

Can we try not to define so many of the methods inside the class itself? It makes for a very large class and an extra indentation level. I'm thinking if you do that most of the static methods in the class can just be static methods at file scope.

Tue, May 9, 9:44 AM
craig.topper added inline comments to D32241: Don't process debug intrinsics in InstCombine.
Tue, May 9, 9:35 AM

Mon, May 8

craig.topper added a comment to D20723: Don't generate unnecessary signed ConstantRange during multiply.

Sorry to dredge this back up. But isn't that only ensuring the lower bound is positive? It doesn't guarantee anything about the upper bound. So I think we are returning full set for [-2, -2] * [0, 1] through the unsigned code and not even checking the signed range.

Mon, May 8, 5:36 PM
craig.topper created D32978: [SCEV] Avoid copying ConstantRange just to get the min/max value.
Mon, May 8, 1:37 PM
craig.topper updated the diff for D32521: [ValueTracking] Use KnownOnes to provide a better bound on known zeros for ctlz/cttz intrinics.

Add negative tests

Mon, May 8, 9:55 AM
craig.topper added a comment to D32770: [X86][LWP] Add clang support for LWP instructions..

Sorry I missed this patch, but shouldn't we had LWP to the relevant processors in test/Preprocessor/predefined-arch-macros.c and the command line switch testing to test/Preprocessor/x86_target_features.c

Mon, May 8, 9:51 AM

Sun, May 7

craig.topper accepted D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target.

LGTM

Sun, May 7, 7:32 PM
craig.topper added inline comments to D32946: [InstCombine] Merge duplicate functionality between InstCombine and ValueTracking.
Sun, May 7, 7:29 PM

Sat, May 6

craig.topper added inline comments to D32946: [InstCombine] Merge duplicate functionality between InstCombine and ValueTracking.
Sat, May 6, 6:42 PM
craig.topper created D32943: [SCEV] Use move semantics in ScalarEvolution::setRange.
Sat, May 6, 9:41 AM

Fri, May 5

craig.topper created D32931: [KnownBits] Add bit counting methods to KnownBits struct and use them where possible.
Fri, May 5, 8:43 PM
craig.topper updated the diff for D32637: [KnownBits] Add methods to set and clear all bits..

Merge setAllZero and forceAllZero. Same for AllOnes.

Fri, May 5, 10:02 AM

Thu, May 4

craig.topper added inline comments to D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..
Thu, May 4, 5:30 PM
craig.topper created D32884: [LazyValueInfo] Avoid unnecessary copies of ConstantRanges.
Thu, May 4, 3:35 PM
craig.topper abandoned D32725: [InstCombine] Apply deMorgan to (and/or (not cmp1), cmp2) when cmp1 has multiple uses, but cmp2 has a single use.
Thu, May 4, 3:00 PM
craig.topper added a comment to D32874: [JumpThreading] Change a dyn_cast that is already protected by an isa check to a static cast. Combine the with another static cast. NFC.

Doesn't isIntegerTy omit vector of integers which would be valid for cmp type?

Thu, May 4, 1:10 PM
craig.topper created D32874: [JumpThreading] Change a dyn_cast that is already protected by an isa check to a static cast. Combine the with another static cast. NFC.
Thu, May 4, 11:42 AM
craig.topper updated the diff for D32637: [KnownBits] Add methods to set and clear all bits..

I've removed the method that sets all bits in both zero and one for now. I think that should be done in a future patch that adds intersecting support since setting all vectors always proceeds an intersection loop. Maybe the method should just be prepareForIntersection or something that stresses that its only useful for that.

Thu, May 4, 9:39 AM
craig.topper added a comment to D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..

Ping

Thu, May 4, 8:32 AM
craig.topper added a comment to D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target.

It looksl ike UseInitArray is connected to -use-ctors command line option to llc so we should be able to test this without a frontend test.

Thu, May 4, 8:28 AM
craig.topper added a comment to D32543: [X86] Clang option -fuse-init-array has no effect when generating for MCU target.

Should we add a test to test/CodeGen/X86/constructor.ll that test appears to have been modified when NAcl was added to the line you changed.

Thu, May 4, 8:26 AM
craig.topper created D32848: [ValueTracking] Introduce a version of computeKnownBits that returns a KnownBits struct. Begin using it to replace internal usages of ComputeSignBit.
Thu, May 4, 12:06 AM

Wed, May 3

craig.topper created D32830: [APInt] Reduce number of allocations involved in multiplying. Reduce worst case multiply size.
Wed, May 3, 2:35 PM
craig.topper added a comment to D32725: [InstCombine] Apply deMorgan to (and/or (not cmp1), cmp2) when cmp1 has multiple uses, but cmp2 has a single use.

should we also lift the one use check for compares in IsFreeToInvert?

Wed, May 3, 9:38 AM
craig.topper added inline comments to D32684: [X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables..
Wed, May 3, 8:37 AM
craig.topper accepted D32679: [X86][AVX-512] Allow EVEX encoded instruction selection when available for mul v8i32..

LGTM

Wed, May 3, 8:27 AM