craig.topper (Craig Topper)
User

Projects

User does not belong to any projects.
User Since
Jul 30 2013, 7:58 PM (194 w, 4 d)

Recent Activity

Fri, Apr 21

craig.topper created D32381: [APSInt] Use APInt::compare and APInt::compareSigned to implement APSInt::compareValue.
Fri, Apr 21, 3:18 PM
craig.topper created D32376: [ValueTracking] Introduce a KnownBits struct to wrap the two APInts for computeKnownBits.
Fri, Apr 21, 2:38 PM
craig.topper updated the diff for D32339: [APInt] Add compare/compareSigned methods that return -1, 0, 1. Reimplement slt/ult and friends using them.

Address Simon's comment.

Fri, Apr 21, 9:10 AM
craig.topper added inline comments to D32323: [SimplifyCFG] Fix the determination of PostBB in conditional store merging to handle the targets on the second branch being commuted.
Fri, Apr 21, 9:03 AM

Thu, Apr 20

craig.topper updated the diff for D32339: [APInt] Add compare/compareSigned methods that return -1, 0, 1. Reimplement slt/ult and friends using them.

Just use tcCompare to implement the slow case compare code.

Thu, Apr 20, 11:46 PM
craig.topper created D32339: [APInt] Add compare/compareSigned methods that return -1, 0, 1. Reimplement slt/ult and friends using them.
Thu, Apr 20, 11:40 PM
craig.topper added inline comments to D32241: Don't process debug intrinsics in InstCombine.
Thu, Apr 20, 11:11 PM
craig.topper created D32323: [SimplifyCFG] Fix the determination of PostBB in conditional store merging to handle the targets on the second branch being commuted.
Thu, Apr 20, 4:23 PM
craig.topper added a comment to D32273: [X86][AVX512] Make i1 illegal in the CodeGen.

I still need to look at this some more, but here a few comments.

Thu, Apr 20, 4:18 PM
craig.topper added a comment to D32244: [BitVector] Add << and >> operators.

BitVector's word size is dependent on target as it is using "unsigned long" not uint32_t/uint64_t. tcShiftRight is hardcoded to uint64_t though we could probably make it a template.

Thu, Apr 20, 9:40 AM
craig.topper accepted D32232: [X86][MPX] Add load & store instructions of bnd values to getLoadStoreRegOpcode function.

LGTM

Thu, Apr 20, 9:25 AM
craig.topper added a comment to D32220: [X86][SSE2] Fix asm string for movq (Move Quadword) instruction.

In the days before the MC layer of LLVM existed, clang would output assembly as text and feed it to the separate assembler tool. So it had to output what the MacOS assembler could parse.

Thu, Apr 20, 9:02 AM
craig.topper accepted D32283: [X86] Remove dead code. .

LGTM

Thu, Apr 20, 8:54 AM

Wed, Apr 19

craig.topper created D32258: [APInt] Add isSubsetOf method that can check if one APInt is a subset of another without creating temporary APInts.
Wed, Apr 19, 4:59 PM
craig.topper created D32253: [APInt] Implement APInt::intersects without creating a temporary APInt in the multiword case.
Wed, Apr 19, 4:01 PM
craig.topper added inline comments to D32244: [BitVector] Add << and >> operators.
Wed, Apr 19, 3:45 PM
craig.topper added inline comments to D32241: Don't process debug intrinsics in InstCombine.
Wed, Apr 19, 3:13 PM
craig.topper added inline comments to D32244: [BitVector] Add << and >> operators.
Wed, Apr 19, 2:41 PM
craig.topper added a comment to D32236: PR32710: Disable using PMADDWD for unsigned short..

Oops. didn't notice this was closed already. But can we run the script over the test now?

Wed, Apr 19, 1:09 PM
craig.topper added inline comments to D32236: PR32710: Disable using PMADDWD for unsigned short..
Wed, Apr 19, 1:08 PM
craig.topper added a comment to D32220: [X86][SSE2] Fix asm string for movq (Move Quadword) instruction.

This wasn't a mistake. We have aliases for movq for this instruction already. This was for compatibility with MacOS/Darwin's old assembler from the pre-clang days.

Wed, Apr 19, 10:09 AM
craig.topper added inline comments to D32232: [X86][MPX] Add load & store instructions of bnd values to getLoadStoreRegOpcode function.
Wed, Apr 19, 9:42 AM

Tue, Apr 18

craig.topper added inline comments to D32162: Inline asm 0bH conflict.
Tue, Apr 18, 11:26 PM
craig.topper created D32188: [MemoryBuiltins] Add isMallocOrCallocLikeFn so BasicAA can check for both at the same time.
Tue, Apr 18, 1:57 PM
craig.topper updated the diff for D32155: [APInt] Use lshrInPlace to replace lshr where possible.

Dont' return *this by reference from lshrInPlace

Tue, Apr 18, 10:03 AM
craig.topper added a comment to D32155: [APInt] Use lshrInPlace to replace lshr where possible.

I'll remove the return reference.

Tue, Apr 18, 9:45 AM
craig.topper created D32155: [APInt] Use lshrInPlace to replace lshr where possible.
Tue, Apr 18, 12:11 AM

Mon, Apr 17

craig.topper updated the diff for D32114: [APInt] Merge the multiword code from lshrInPlace and tcShiftRight into a single implementation.

Update comments and variable names. Add some basic tests.

Mon, Apr 17, 2:26 PM
craig.topper added a comment to D32114: [APInt] Merge the multiword code from lshrInPlace and tcShiftRight into a single implementation.

I want to look at left shift at some point. Also making an in place version of ashr as well. lshrInPlace was just added last week which is why I focused on it.

Mon, Apr 17, 1:45 PM
craig.topper updated the diff for D32116: [APInt] Remove self move check from move assignment operator.
Mon, Apr 17, 11:34 AM
craig.topper added a comment to D30629: [APInt] Give the value union a name so we can remove assumptions on VAL being the larger member.

Adding a few others who have been involved or reviewed APInt patch changes recently.

Mon, Apr 17, 11:18 AM
craig.topper added reviewers for D30629: [APInt] Give the value union a name so we can remove assumptions on VAL being the larger member: hans, RKSimon, rsmith.
Mon, Apr 17, 11:18 AM
craig.topper added inline comments to D32116: [APInt] Remove self move check from move assignment operator.
Mon, Apr 17, 11:05 AM
craig.topper added a comment to D31841: [IR] Implement DataLayout::getPointerTypeSizeInBits using getPointerSizeInBits directly.

Ping

Mon, Apr 17, 10:01 AM
craig.topper added a comment to D31733: [IR] Put the Use list waymarking bits in the bit positions documentation says they are using.

Ping

Mon, Apr 17, 10:00 AM
craig.topper updated the diff for D32098: [InstCombine] Use less bitwise operations to handle Instruction::SExt in SimplifyDemandedUseBits. Other improvements..

Use APInt::isSignBitSet instead of isNegative

Mon, Apr 17, 9:57 AM

Sun, Apr 16

craig.topper created D32123: [InstCombine] In SimplifyDemandedUseBits, use computeKnownBits directly to handle Constants.
Sun, Apr 16, 10:17 PM
craig.topper updated the diff for D32114: [APInt] Merge the multiword code from lshrInPlace and tcShiftRight into a single implementation.

Fix diff context

Sun, Apr 16, 1:24 AM
craig.topper updated the diff for D32116: [APInt] Remove self move check from move assignment operator.

Fix diff context

Sun, Apr 16, 1:22 AM
craig.topper created D32116: [APInt] Remove self move check from move assignment operator.
Sun, Apr 16, 1:21 AM

Sat, Apr 15

craig.topper created D32114: [APInt] Merge the multiword code from lshrInPlace and tcShiftRight into a single implementation.
Sat, Apr 15, 11:31 PM
craig.topper added a comment to D32002: [X86] Improve large struct pass by value performance.

Is this related to this bit from the Intel Optimization Manual.

Sat, Apr 15, 3:45 PM

Fri, Apr 14

craig.topper created D32108: [APInt] Rename getSignBit to getSignMask.
Fri, Apr 14, 11:35 PM
craig.topper added inline comments to D32098: [InstCombine] Use less bitwise operations to handle Instruction::SExt in SimplifyDemandedUseBits. Other improvements..
Fri, Apr 14, 3:45 PM
craig.topper created D32098: [InstCombine] Use less bitwise operations to handle Instruction::SExt in SimplifyDemandedUseBits. Other improvements..
Fri, Apr 14, 3:10 PM
craig.topper created D32094: [InstCombine] MakeAnd/Or/Xor handling to reuse previous APInt computations.
Fri, Apr 14, 1:55 PM
craig.topper added reviewers for D32002: [X86] Improve large struct pass by value performance: zvi, RKSimon.
Fri, Apr 14, 1:46 PM
craig.topper created D32089: [ValueTracking] Avoid undefined behavior in unittest by not making a named ArrayRef from a std::initializer_list.
Fri, Apr 14, 10:53 AM

Thu, Apr 13

craig.topper added a comment to D32018: [MVT][SVE] Scalable vector MVTs (2/3).

They aren't serialized. They belong to the CodeGen implementation. IR doesn't use these.

Thu, Apr 13, 10:48 AM
craig.topper added a comment to D32001: [APInt] Reorder fields to avoid a hole in the middle of the class.

Turns out MSVC has different packing than gcc/clang. So APSInt doesn't use the padding from APInt for storage. So the static_assert failed on windows.

Thu, Apr 13, 10:46 AM
craig.topper added inline comments to D32018: [MVT][SVE] Scalable vector MVTs (2/3).
Thu, Apr 13, 9:26 AM

Wed, Apr 12

craig.topper created D32001: [APInt] Reorder fields to avoid a hole in the middle of the class.
Wed, Apr 12, 9:20 PM
craig.topper added a comment to D31968: Remove all allocation and divisions from GreatestCommonDivisor.

I guess I didn't submit the comment. Should be there now.

Wed, Apr 12, 4:33 PM
craig.topper added inline comments to D31996: Make Gentoo GNU GCC Config override whitespace tolerant.
Wed, Apr 12, 4:24 PM
craig.topper accepted D31968: Remove all allocation and divisions from GreatestCommonDivisor.

Thanks for using WordType. At some point I'll continue my cleanup of APInt and use that everwhere.

Wed, Apr 12, 2:52 PM
craig.topper added a comment to D31194: [InstSimplify] Try to Constant Fold the Instruction before simplification .

I wonder if you should just call ConstantFoldInstOperands where we currently call ConstantExpr::getElementPtr? I think that will try to constant fold it before falling back to ConstantExpr::getElementPtr.

Wed, Apr 12, 2:09 PM
craig.topper added inline comments to D31120: [InstCombine] Teach SimplifyDemandedUseBits that adding or subtractings 0s from every bit below the highest demanded bit can be simplified.
Wed, Apr 12, 9:36 AM
craig.topper added a comment to D31396: [X86][LLVM][Canonical Compare Intrinsics] Creating a canonical representation for X86 CMP intrinsics.

What is the plan for supporting the SSE intrinsics?

Wed, Apr 12, 9:31 AM

Tue, Apr 11

craig.topper added a comment to D31968: Remove all allocation and divisions from GreatestCommonDivisor.

Can we just merge lshrNear fully into lshrInPlace and just use lshrInPlace in the other place that uses lshrNear?

Tue, Apr 11, 8:41 PM
craig.topper accepted D31833: [x86] Relax the check in areLoadsFromSameBasePtr.

LGTM

Tue, Apr 11, 1:21 PM
craig.topper accepted D31767: [LLVM][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation.

Did we really not have tests for the avx512 and sse41 versions?

Tue, Apr 11, 9:29 AM

Mon, Apr 10

craig.topper created D31913: [InstCombine] Refactor SimplifyUsingDistributiveLaws to more explicitly skip code when LHS/RHS aren't BinaryOperators.
Mon, Apr 10, 5:14 PM
craig.topper added a comment to D31833: [x86] Relax the check in areLoadsFromSameBasePtr.

Evan Cheng added this in r94147 at that time there was an additional check on the index register itself too. This is what the "Index should be Reg0" comment was referring too, but I don't know what that means. Its before my time. Jakob Stoklund Olesen removed that check in r100497, but did not update the comment about Reg0.

Mon, Apr 10, 3:22 PM
craig.topper added a comment to D31678: [InstCombine] Fix change flag handling to report all IR changes up to the pass manager or preseved analyses.

@chandlerc do you know of other tests that check this sort of thing or can you give more guidance. I haven't spent a lot of time in the IR optimizers until recently.

Mon, Apr 10, 2:37 PM
craig.topper added inline comments to D31767: [LLVM][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation.
Mon, Apr 10, 11:14 AM
craig.topper accepted D31863: [InstCombine] morph an existing instruction instead of creating a new one.

LGTM

Mon, Apr 10, 9:28 AM
craig.topper added a comment to D31678: [InstCombine] Fix change flag handling to report all IR changes up to the pass manager or preseved analyses.

I can certainly try. What exactly were you envisioning?

Mon, Apr 10, 12:18 AM

Fri, Apr 7

craig.topper created D31841: [IR] Implement DataLayout::getPointerTypeSizeInBits using getPointerSizeInBits directly.
Fri, Apr 7, 11:47 PM
craig.topper accepted D31754: [X86][MMX] Add fast-isel support for MMX non-temporal writes.

LGTM

Fri, Apr 7, 9:58 PM
craig.topper accepted D31766: [Clang][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation.

LGTM

Fri, Apr 7, 9:53 PM
craig.topper added inline comments to D31767: [LLVM][X86][SSE] Update MOVNTDQA non-temporal loads to generic implementation.
Fri, Apr 7, 9:53 PM
craig.topper accepted D31428: [x86] fix AVX FP cmp intrinsic documentation (PR28110).

LGTM

Fri, Apr 7, 9:45 PM
craig.topper accepted D31714: [X86] Added missing mayLoad/mayStore attributes to some X86 instructions.

LGTM

Fri, Apr 7, 9:40 PM

Thu, Apr 6

craig.topper added inline comments to D31715: [SelectionDAG] TargetLowering::SimplifyDemandedBits how to properly calculate KnownZero bits for ISD::SETCC and ISD::AssertZExt.
Thu, Apr 6, 9:21 AM
craig.topper accepted D31743: [X86] Change instructions names to keep consistency with the naming convention. NFC.

LGTM

Thu, Apr 6, 9:18 AM

Wed, Apr 5

craig.topper updated the diff for D31733: [IR] Put the Use list waymarking bits in the bit positions documentation says they are using.

Add additional comments.

Wed, Apr 5, 5:07 PM
craig.topper created D31733: [IR] Put the Use list waymarking bits in the bit positions documentation says they are using.
Wed, Apr 5, 4:22 PM
craig.topper created D31724: [SelectionDAG] Remove special call to LHS computeKnownBits for ANDs with constant RHS..
Wed, Apr 5, 1:56 PM
craig.topper updated the diff for D31715: [SelectionDAG] TargetLowering::SimplifyDemandedBits how to properly calculate KnownZero bits for ISD::SETCC and ISD::AssertZExt.

Addressed Simon's comment.

Wed, Apr 5, 12:14 PM
craig.topper added a comment to D30922: [Builtins] Synchronize the definition of fma/fmaf/fmal in Builtins.def with the implementation in CGBuiltins.cpp.

Ping

Wed, Apr 5, 11:29 AM
craig.topper added a comment to D31714: [X86] Added missing mayLoad/mayStore attributes to some X86 instructions.

Are you planning to put ARPL, LAR, VERR, VERW, SLDT, LLDT and many others here in the automated tables?

Wed, Apr 5, 11:21 AM
craig.topper added inline comments to D31714: [X86] Added missing mayLoad/mayStore attributes to some X86 instructions.
Wed, Apr 5, 11:15 AM
craig.topper created D31715: [SelectionDAG] TargetLowering::SimplifyDemandedBits how to properly calculate KnownZero bits for ISD::SETCC and ISD::AssertZExt.
Wed, Apr 5, 10:06 AM

Tue, Apr 4

craig.topper created D31690: [InstCombine] Make sure we preserve fast math flags when folding fp instructions into phi nodes.
Tue, Apr 4, 5:37 PM
craig.topper created D31686: [InstCombine] Support folding a subtract with a constant LHS into a phi node.
Tue, Apr 4, 4:56 PM
craig.topper created D31683: [InstCombine] Support folding of add instructions with vector constants into select operations.
Tue, Apr 4, 3:54 PM
craig.topper created D31680: [InstCombine] Use commutable and/or/xor matchers to simplify some code.
Tue, Apr 4, 3:02 PM
craig.topper added reviewers for D31679: Use PMADDWD to expand reduction in a loop: RKSimon, zvi.
Tue, Apr 4, 2:10 PM
craig.topper created D31678: [InstCombine] Fix change flag handling to report all IR changes up to the pass manager or preseved analyses.
Tue, Apr 4, 2:05 PM
craig.topper added a comment to D31610: [InstCombine] Support folding and/or/xor with a constant vector RHS into selects and phis.

Agreed. I'll do that.

Tue, Apr 4, 1:33 PM
craig.topper updated the summary of D31610: [InstCombine] Support folding and/or/xor with a constant vector RHS into selects and phis.
Tue, Apr 4, 12:42 PM
craig.topper updated the diff for D31610: [InstCombine] Support folding and/or/xor with a constant vector RHS into selects and phis.

Reduced to just the logic operations. Updated tests to include phis

Tue, Apr 4, 12:41 PM
craig.topper reopened D31543: [InstCombine] Remove redundant combine from visitAnd.

I had to revert the commit of this due to a tsan check failure. it looks like this optimization does fire sometimes because it's mising a qualification to make sure the add or sub is only has one user. So we can create an add or sub without replacing the existing one.

Tue, Apr 4, 9:00 AM

Mon, Apr 3

craig.topper accepted D31394: [X86][Clang] Converting __mm{|256|512}_movm_epi{8|16|32|64} LLVMIR call into generic intrinsics..

LGTM

Mon, Apr 3, 2:04 PM
craig.topper added inline comments to D31394: [X86][Clang] Converting __mm{|256|512}_movm_epi{8|16|32|64} LLVMIR call into generic intrinsics..
Mon, Apr 3, 12:35 PM
craig.topper created D31610: [InstCombine] Support folding and/or/xor with a constant vector RHS into selects and phis.
Mon, Apr 3, 11:16 AM
craig.topper added a comment to D31394: [X86][Clang] Converting __mm{|256|512}_movm_epi{8|16|32|64} LLVMIR call into generic intrinsics..

Y

Mon, Apr 3, 9:24 AM
craig.topper accepted D31393: [X86][LLVM] Converting __mm{|256|512}_movm_epi{8|16|32|64} LLVMIR call into generic intrinsics..

LGTM

Mon, Apr 3, 9:21 AM

Sun, Apr 2

craig.topper added a comment to D31543: [InstCombine] Remove redundant combine from visitAnd.

I think the first version of this was added in r23379 in 2005, but there's no test case changes in that commit, but one is mentioned by name in the commit message. That test appears to be test29 in test/Transforms/InstCombine/add.ll that was added in the commit previous to that. That test case still exists today.

Sun, Apr 2, 10:28 AM

Sat, Apr 1

craig.topper created D31572: [APInt] Allow GreatestCommonDivisor to take rvalue inputs efficiently. Use moves instead of copies in the loop..
Sat, Apr 1, 11:53 AM