Page MenuHomePhabricator
Feed Advanced Search

Today

arsenm accepted D57847: Add skipFunction to PostRA machine sinking pass..

LGTM

Wed, Feb 20, 6:03 PM · Restricted Project
arsenm added inline comments to D58481: [AMDGPU] fix commuted case of sub combine.
Wed, Feb 20, 6:01 PM · Restricted Project
arsenm accepted D58481: [AMDGPU] fix commuted case of sub combine.

LGTM

Wed, Feb 20, 5:36 PM · Restricted Project
arsenm added inline comments to D58481: [AMDGPU] fix commuted case of sub combine.
Wed, Feb 20, 5:13 PM · Restricted Project
arsenm added inline comments to D58400: [AMDGPU] Implement AMDGPUMCInstrAnalysis.
Wed, Feb 20, 2:03 PM · Restricted Project
arsenm added a comment to D58419: [GISel]: Allow G_EXTRACT_VEC_ELT's result to be larger the source element type.

I always thought this behavior in SelectionDAG was error prone.

Personally in an out of tree backend, I find BUILD_VEC_TRUNC to be very elegant when trying to legalize/optimize vector types whose scalar types are illegal in the architecture otherwise needing several unmerges + shifts + ands.
I'm fine with adding a separate opcode (say G_EXTRACT_VECTOR_ELT_ANYEXT - suggestions accepted).
We need to do something similar for INSERT_VEC_ELT which can implicitly truncate.

Wed, Feb 20, 10:39 AM · Restricted Project
arsenm committed rG75e30c4d5d5b: GlobalISel: Fix fewerElementsVector for ctlz with different result type (authored by arsenm).
GlobalISel: Fix fewerElementsVector for ctlz with different result type
Wed, Feb 20, 8:43 AM
arsenm committed rL354480: GlobalISel: Fix fewerElementsVector for ctlz with different result type.
GlobalISel: Fix fewerElementsVector for ctlz with different result type
Wed, Feb 20, 8:43 AM
arsenm added inline comments to D58400: [AMDGPU] Implement AMDGPUMCInstrAnalysis.
Wed, Feb 20, 8:15 AM · Restricted Project
arsenm committed rGc4d07554e448: GlobalISel: Implement moreElementsVector for g_insert results (authored by arsenm).
GlobalISel: Implement moreElementsVector for g_insert results
Wed, Feb 20, 8:12 AM
arsenm committed rL354477: GlobalISel: Implement moreElementsVector for g_insert results.
GlobalISel: Implement moreElementsVector for g_insert results
Wed, Feb 20, 8:12 AM
arsenm closed D58136: GlobalISel: Implement moreElementsVector for g_insert results.

r354477

Wed, Feb 20, 8:12 AM
arsenm added a reviewer for D58360: Remove the AliasAnalysis argument in function areMemAccessesTriviallyDisjoint: hfinkel.
Wed, Feb 20, 7:28 AM
arsenm added a parent revision for D58449: Junk: Add assert to find GCCBuiltins with constant arguments missing : D57825: IR: Add immarg attribute.
Wed, Feb 20, 7:24 AM
arsenm added a child revision for D57825: IR: Add immarg attribute: D58449: Junk: Add assert to find GCCBuiltins with constant arguments missing .
Wed, Feb 20, 7:24 AM
arsenm updated the diff for D58351: ARM: Add ImmArg to intrinsics.

Handled mentioned intrinsics

Wed, Feb 20, 7:21 AM
arsenm updated the diff for D58353: SystemZ: Add ImmArg to intrinsics.

Address comments

Wed, Feb 20, 7:21 AM
arsenm added a comment to D58352: Mips: Add ImmArg to intrinsics.

Thanks for pointing to the problem. Could you provide the "assertion" used for finding the issue?

Unfortunately the current patch shows the error on compilation:

llvm/include/llvm/IR/IntrinsicsMips.td:237:46: error: Expected a class name, got 'ImmArg'
  Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [ImmArg<1>]>;
                                             ^

I posted the hack here: D58449

Wed, Feb 20, 7:19 AM
arsenm created D58449: Junk: Add assert to find GCCBuiltins with constant arguments missing .
Wed, Feb 20, 7:19 AM
arsenm added a comment to D58419: [GISel]: Allow G_EXTRACT_VEC_ELT's result to be larger the source element type.

I always thought this behavior in SelectionDAG was error prone. I think I broke this on every combine I ever wrote for extract_vector_elt. Should there be a separate extending opcode instead? Although that would probably make some combines more painful. In GlobalISel we already have an explicit G_BUILD_VECTOR_TRUNC instead of the old ISD::BUILD_VECTOR truncate behavior, so that would match. However I don't think G_BUILD_VECTOR_TRUNC is well developed enough to declare that was definitely a good decision yet.

Wed, Feb 20, 7:09 AM · Restricted Project
arsenm added inline comments to D58351: ARM: Add ImmArg to intrinsics.
Wed, Feb 20, 5:53 AM

Yesterday

arsenm added inline comments to D58402: RegBankSelect: Allow targets to introduce control flow for mapping.
Tue, Feb 19, 3:49 PM
arsenm created D58402: RegBankSelect: Allow targets to introduce control flow for mapping.
Tue, Feb 19, 1:11 PM
arsenm added inline comments to D58400: [AMDGPU] Implement AMDGPUMCInstrAnalysis.
Tue, Feb 19, 11:52 AM · Restricted Project
arsenm added inline comments to D58400: [AMDGPU] Implement AMDGPUMCInstrAnalysis.
Tue, Feb 19, 11:51 AM · Restricted Project
arsenm committed rGb4c95b338ba7: GlobalISel: Implement moreElementsVector for select (authored by arsenm).
GlobalISel: Implement moreElementsVector for select
Tue, Feb 19, 9:03 AM
arsenm closed D58127: GlobalISel: Implement moreElementsVector for select.

r354354

Tue, Feb 19, 9:03 AM
arsenm committed rL354354: GlobalISel: Implement moreElementsVector for select.
GlobalISel: Implement moreElementsVector for select
Tue, Feb 19, 9:02 AM
arsenm committed rG4d88427a58dd: GlobalISel: Implement moreElementsVector for G_EXTRACT source (authored by arsenm).
GlobalISel: Implement moreElementsVector for G_EXTRACT source
Tue, Feb 19, 8:44 AM
arsenm closed D58124: GlobalISel: Implement moreElementsVector for G_EXTRACT source.

r354348

Tue, Feb 19, 8:44 AM
arsenm committed rL354348: GlobalISel: Implement moreElementsVector for G_EXTRACT source.
GlobalISel: Implement moreElementsVector for G_EXTRACT source
Tue, Feb 19, 8:43 AM
arsenm committed rG26b7e859efb0: GlobalISel: Implement moreElementsVector for bit ops (authored by arsenm).
GlobalISel: Implement moreElementsVector for bit ops
Tue, Feb 19, 8:30 AM
arsenm committed rL354345: GlobalISel: Implement moreElementsVector for bit ops.
GlobalISel: Implement moreElementsVector for bit ops
Tue, Feb 19, 8:30 AM
arsenm closed D58123: GlobalISel: Implement moreElementsVector for bit ops.

r354345

Tue, Feb 19, 8:29 AM
arsenm committed rG267601455eca: GlobalISel: Verify g_insert (authored by arsenm).
GlobalISel: Verify g_insert
Tue, Feb 19, 8:10 AM
arsenm closed D58262: GlobalISel: Verify g_insert.

r354342

Tue, Feb 19, 8:10 AM
arsenm committed rL354342: GlobalISel: Verify g_insert.
GlobalISel: Verify g_insert
Tue, Feb 19, 8:09 AM
arsenm accepted D58226: [InferAddressSpaces] Prevent crash on nested ConstantExpr.

LGTM

Tue, Feb 19, 7:59 AM · Restricted Project

Mon, Feb 18

arsenm committed rGfbe92a53d073: GlobalISel: Implement widenScalar for g_extract scalar results (authored by arsenm).
GlobalISel: Implement widenScalar for g_extract scalar results
Mon, Feb 18, 2:43 PM
arsenm committed rGe84bdce60998: GlobalISel: Make buildExtract use DstOp/SrcOp (authored by arsenm).
GlobalISel: Make buildExtract use DstOp/SrcOp
Mon, Feb 18, 2:43 PM
arsenm committed rL354293: GlobalISel: Implement widenScalar for g_extract scalar results.
GlobalISel: Implement widenScalar for g_extract scalar results
Mon, Feb 18, 2:43 PM
arsenm committed rL354292: GlobalISel: Make buildExtract use DstOp/SrcOp.
GlobalISel: Make buildExtract use DstOp/SrcOp
Mon, Feb 18, 2:43 PM
arsenm closed D58078: GlobalISel: Implement widenScalar for g_extract scalar results.

r354292-354293

Mon, Feb 18, 2:42 PM
arsenm added inline comments to D58295: AMDGPU: Fix memory dependence analysis by considering the offset..
Mon, Feb 18, 2:34 PM · Restricted Project
arsenm accepted D58295: AMDGPU: Fix memory dependence analysis by considering the offset..

LGTM

Mon, Feb 18, 2:33 PM · Restricted Project
arsenm added inline comments to D58078: GlobalISel: Implement widenScalar for g_extract scalar results.
Mon, Feb 18, 2:11 PM
arsenm updated the diff for D58353: SystemZ: Add ImmArg to intrinsics.

Handle missed intrinsics

Mon, Feb 18, 12:09 PM
arsenm updated the diff for D57825: IR: Add immarg attribute.

Add release note

Mon, Feb 18, 12:08 PM
arsenm added a comment to D58356: Hexagon: Add ImmArg to intrinsics.

Was the S2_insert omitted because you missed it when you were editing the .td file, or because your testing didn't find it? From your description so far, all I really know is that you added an assertion somewhere, the rest is really vague.

I didn't find it, I'll try to figure out why.

Mon, Feb 18, 12:03 PM
arsenm added a comment to D58353: SystemZ: Add ImmArg to intrinsics.

I'm not quite sure I understand the logic why some intrinsics that require immediate arguments are marked with ImmArg, but others are not?

Shouldn't we mark all of them? The ones I see missing in your patch are:

defm int_s390_vfae  : SystemZTernaryIntCCBHF;
defm int_s390_vfaez : SystemZTernaryIntCCBHF;
defm int_s390_vstrc  : SystemZQuaternaryIntCCBHF;
defm int_s390_vstrcz : SystemZQuaternaryIntCCBHF;
def int_s390_vfmaxdb : Intrinsic<[llvm_v2f64_ty],
def int_s390_vfmindb : Intrinsic<[llvm_v2f64_ty],
def int_s390_vfmaxsb : Intrinsic<[llvm_v4f32_ty],
def int_s390_vfminsb : Intrinsic<[llvm_v4f32_ty],
def int_s390_vftcidb : SystemZBinaryConvIntCC<llvm_v2i64_ty, llvm_v2f64_ty>;
def int_s390_vftcisb : SystemZBinaryConvIntCC<llvm_v4i32_ty, llvm_v4f32_ty>;
def int_s390_vfidb : Intrinsic<[llvm_v2f64_ty],
def int_s390_vfisb : Intrinsic<[llvm_v4f32_ty],

Maybe it would actually make more sense to add the ImmArg directly in the SystemZ*Int* helper macros; those intrinsics really all need immediate arguments. (The sole exception I can see is verll, but that probably should use a different helper then.)

I'm doing this blindly based on the definitions here https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/BuiltinsSystemZ.def
Are these accurate and complete?

Yes, they are ... but note that all the intrinsics I listed above are actually marked as requiring immediates there too. (E.g. int_s390_vfmaxdb gets emitted from __builtin_s390_vfmaxdb, which has an "Ii" marker.)

Mon, Feb 18, 11:27 AM
arsenm added a comment to D58356: Hexagon: Add ImmArg to intrinsics.

I'm not expecting this patch to be complete. Most of the intrinsic definitions are actually auto-generated, so we'll need to update the generating scripts to include these new annotations. What concerns me is that you claim that some things are missing, which could indicate that there are some issues with the generators. I'm trying to understand exactly what the missing pieces are, the contents of this patch are actually of secondary importance.

Mon, Feb 18, 9:56 AM
arsenm added a comment to D58356: Hexagon: Add ImmArg to intrinsics.

There has to be a corresponding builtin definition explicitly defined in clang, which also needs to correctly mark the required constant operands. The test coverage for which operands need to be constants is spotty or nonexistent for these, so those are possibly missing in the builtin definition.

So you added the assertion to clang and ran clang-check? This patch is missing information for S2_insert (that's one case that found by just looking at it), but the builtin for S2_insert is both marked properly in BuiltinsHexagon.def, and is run through clang codegen tests.

About this thing in particular:

The test coverage for which operands need to be constants is spotty or nonexistent for these, so those are possibly missing in the builtin definition.

Yes, we only test a few cases to see if the SemaCheck machinery works, I'm not sure if that's what you're referring to. There are a lot more builtins tested for codegen, which should still go through the same checks (this includes the S2_insert builtin, which is not annotated in this patch).

Yes, there isn't test coverage to make sure each builtin is properly marked for constant arguments.

Mon, Feb 18, 9:55 AM
arsenm committed rGdebaf4bd31a1: GlobalISel: Fix double count of offset for irregular vector breakdowns (authored by arsenm).
GlobalISel: Fix double count of offset for irregular vector breakdowns
Mon, Feb 18, 9:03 AM
arsenm committed rL354280: GlobalISel: Fix double count of offset for irregular vector breakdowns.
GlobalISel: Fix double count of offset for irregular vector breakdowns
Mon, Feb 18, 9:01 AM
arsenm added a comment to D58353: SystemZ: Add ImmArg to intrinsics.

I'm not quite sure I understand the logic why some intrinsics that require immediate arguments are marked with ImmArg, but others are not?

Shouldn't we mark all of them? The ones I see missing in your patch are:

defm int_s390_vfae  : SystemZTernaryIntCCBHF;
defm int_s390_vfaez : SystemZTernaryIntCCBHF;
defm int_s390_vstrc  : SystemZQuaternaryIntCCBHF;
defm int_s390_vstrcz : SystemZQuaternaryIntCCBHF;
def int_s390_vfmaxdb : Intrinsic<[llvm_v2f64_ty],
def int_s390_vfmindb : Intrinsic<[llvm_v2f64_ty],
def int_s390_vfmaxsb : Intrinsic<[llvm_v4f32_ty],
def int_s390_vfminsb : Intrinsic<[llvm_v4f32_ty],
def int_s390_vftcidb : SystemZBinaryConvIntCC<llvm_v2i64_ty, llvm_v2f64_ty>;
def int_s390_vftcisb : SystemZBinaryConvIntCC<llvm_v4i32_ty, llvm_v4f32_ty>;
def int_s390_vfidb : Intrinsic<[llvm_v2f64_ty],
def int_s390_vfisb : Intrinsic<[llvm_v4f32_ty],

Maybe it would actually make more sense to add the ImmArg directly in the SystemZ*Int* helper macros; those intrinsics really all need immediate arguments. (The sole exception I can see is verll, but that probably should use a different helper then.)

Mon, Feb 18, 8:55 AM
arsenm added a comment to D58356: Hexagon: Add ImmArg to intrinsics.

I don't really understand the summary, could you elaborate on how the asserting implies the conclusion (the part that follows "This means that..."). Also, what does that part mean on its own? "Intrinsics are missing that don't use GCCBuiltin...", meaning that you'd expect some intrinsics that don't use GCCBuiltin, but they're not defined?

Mon, Feb 18, 8:46 AM
arsenm added a parent revision for D58356: Hexagon: Add ImmArg to intrinsics: D57825: IR: Add immarg attribute.
Mon, Feb 18, 8:05 AM
arsenm added a child revision for D57825: IR: Add immarg attribute: D58356: Hexagon: Add ImmArg to intrinsics.
Mon, Feb 18, 8:05 AM
arsenm created D58356: Hexagon: Add ImmArg to intrinsics.
Mon, Feb 18, 8:05 AM
arsenm added a parent revision for D58354: PowerPC: Add ImmArg to intrinsics: D57825: IR: Add immarg attribute.
Mon, Feb 18, 8:04 AM
arsenm added a child revision for D57825: IR: Add immarg attribute: D58354: PowerPC: Add ImmArg to intrinsics.
Mon, Feb 18, 8:04 AM
arsenm created D58354: PowerPC: Add ImmArg to intrinsics.
Mon, Feb 18, 8:04 AM
arsenm added a parent revision for D58353: SystemZ: Add ImmArg to intrinsics: D57825: IR: Add immarg attribute.
Mon, Feb 18, 8:03 AM
arsenm added a child revision for D57825: IR: Add immarg attribute: D58353: SystemZ: Add ImmArg to intrinsics.
Mon, Feb 18, 8:03 AM
arsenm created D58353: SystemZ: Add ImmArg to intrinsics.
Mon, Feb 18, 8:02 AM
arsenm added a parent revision for D58352: Mips: Add ImmArg to intrinsics: D57825: IR: Add immarg attribute.
Mon, Feb 18, 8:01 AM
arsenm added a child revision for D57825: IR: Add immarg attribute: D58352: Mips: Add ImmArg to intrinsics.
Mon, Feb 18, 8:01 AM
arsenm created D58352: Mips: Add ImmArg to intrinsics.
Mon, Feb 18, 8:01 AM
arsenm added a parent revision for D58351: ARM: Add ImmArg to intrinsics: D57825: IR: Add immarg attribute.
Mon, Feb 18, 8:01 AM
arsenm added a child revision for D57825: IR: Add immarg attribute: D58351: ARM: Add ImmArg to intrinsics.
Mon, Feb 18, 8:01 AM
arsenm created D58351: ARM: Add ImmArg to intrinsics.
Mon, Feb 18, 7:59 AM
arsenm added inline comments to D58123: GlobalISel: Implement moreElementsVector for bit ops.
Mon, Feb 18, 7:45 AM
arsenm added a comment to D58302: [X86] Add ImmArg markings to intrinsics..

Missing context.

This patch makes sense - are there any warnings/assertions that check if the GCC builtin signature matches the IR intrinsic def? I had a quick look at D57825 but didn't notice anything.

Mon, Feb 18, 6:03 AM

Sun, Feb 17

arsenm added inline comments to D58123: GlobalISel: Implement moreElementsVector for bit ops.
Sun, Feb 17, 11:38 AM
arsenm updated the diff for D58123: GlobalISel: Implement moreElementsVector for bit ops.

Address comments

Sun, Feb 17, 11:38 AM

Fri, Feb 15

arsenm added a comment to D58302: [X86] Add ImmArg markings to intrinsics..

First set:
Missing immarg: 4 to builtin_ia32_gatherd_d
Missing immarg: 3 to
builtin_ia32_fixupimmpd512_mask
Missing immarg: 5 to builtin_ia32_fixupimmpd512_mask
Missing immarg: 1 to
builtin_ia32_vec_ext_v4hi

Fri, Feb 15, 1:33 PM
arsenm added a comment to D58302: [X86] Add ImmArg markings to intrinsics..

Thanks, I have a hacky patch to assert in clang based on the builtin definition I'm working through. I'll see how many tests still fail with this

Fri, Feb 15, 1:17 PM
arsenm requested changes to D58295: AMDGPU: Fix memory dependence analysis by considering the offset..
Fri, Feb 15, 11:19 AM · Restricted Project
arsenm updated the diff for D57825: IR: Add immarg attribute.

Handle a few more intrinsics, drop more custom checks

Fri, Feb 15, 10:29 AM
arsenm added inline comments to D58288: [AMDGPU][MC][GFX8+] Added syntactic sugar for 'vgpr index' operand of instructions s_set_gpr_idx_on and s_set_gpr_idx_mode.
Fri, Feb 15, 9:33 AM
arsenm closed D58261: GlobalISel: Fix inadequate verification of g_build_vector.

r354139

Fri, Feb 15, 7:38 AM
arsenm closed D58256: Try to organize MachineVerifier tests.

r354138

Fri, Feb 15, 7:38 AM
arsenm committed rG59ecdb0d8be4: GlobalISel: Fix inadequate verification of g_build_vector (authored by arsenm).
GlobalISel: Fix inadequate verification of g_build_vector
Fri, Feb 15, 7:25 AM
arsenm committed rG4673fdc53113: Try to organize MachineVerifier tests (authored by arsenm).
Try to organize MachineVerifier tests
Fri, Feb 15, 7:24 AM
arsenm committed rL354139: GlobalISel: Fix inadequate verification of g_build_vector.
GlobalISel: Fix inadequate verification of g_build_vector
Fri, Feb 15, 7:24 AM
arsenm committed rL354138: Try to organize MachineVerifier tests.
Try to organize MachineVerifier tests
Fri, Feb 15, 7:24 AM
arsenm added a comment to D58233: Allow replacing intrinsic operands with variables.

What protects target intrinsics that haven't been annotated with immarg yet?

Nothing, these need to be accurate. I looked through the current set of in-tree target intrinsics, but don't see any comments or documentation stating certain arguments need to be constant so I hope we are OK there.

Fri, Feb 15, 6:57 AM
arsenm added a comment to D58233: Allow replacing intrinsic operands with variables.

What protects target intrinsics that haven't been annotated with immarg yet?

Fri, Feb 15, 6:38 AM

Thu, Feb 14

arsenm committed rG2a5488b8770d: X86: Replace isSafeToClobberEFLAGS implementation (authored by arsenm).
X86: Replace isSafeToClobberEFLAGS implementation
Thu, Feb 14, 8:02 PM
arsenm committed rL354098: X86: Replace isSafeToClobberEFLAGS implementation.
X86: Replace isSafeToClobberEFLAGS implementation
Thu, Feb 14, 8:01 PM
arsenm closed D58198: X86: Replace isSafeToClobberEFLAGS implementation.

r354098

Thu, Feb 14, 8:01 PM
arsenm added a comment to D58096: [LowerSwitch][AMDGPU] Do not handle impossible values.

It seems weird to me that doing this somewhere else somehow ends up being more expensive, but this needs a comment somewhere explaining why it should be handled here

Thu, Feb 14, 5:05 PM · Restricted Project
arsenm added inline comments to D58226: [InferAddressSpaces] Prevent crash on nested ConstantExpr.
Thu, Feb 14, 4:50 PM · Restricted Project
arsenm added a comment to D58226: [InferAddressSpaces] Prevent crash on nested ConstantExpr.

I misread the test case, this isn't a vector of pointers. If you can simplify the test by removing the vectors, that would be slightly better.

Thu, Feb 14, 4:32 PM · Restricted Project
arsenm updated the diff for D58252: RegBankSelect: Handle slightly more complex value mappings.

Generate check lines

Thu, Feb 14, 4:20 PM
arsenm created D58262: GlobalISel: Verify g_insert.
Thu, Feb 14, 4:15 PM
arsenm created D58261: GlobalISel: Fix inadequate verification of g_build_vector.
Thu, Feb 14, 3:45 PM
arsenm created D58256: Try to organize MachineVerifier tests.
Thu, Feb 14, 3:19 PM
arsenm committed rG530d05e94ac0: GlobalISel: Add alignment to LegalityQuery MMOs (authored by arsenm).
GlobalISel: Add alignment to LegalityQuery MMOs
Thu, Feb 14, 2:43 PM
arsenm committed rG294483f1c048: Replace gcroot verifier tests (authored by arsenm).
Replace gcroot verifier tests
Thu, Feb 14, 2:43 PM