Page MenuHomePhabricator

mcberg2017 (Michael Berg)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 18 2017, 1:54 PM (104 w, 1 d)

Recent Activity

Mon, Jul 15

mcberg2017 added a comment to D64713: [InstCombine] X *fast (C ? 1.0 : 0.0) -> C ? X : 0.0.

Looks ok to me, but I would like some of the others to chime in first.

Mon, Jul 15, 6:52 AM · Restricted Project
mcberg2017 added reviewers for D64713: [InstCombine] X *fast (C ? 1.0 : 0.0) -> C ? X : 0.0: spatel, arsenm.
Mon, Jul 15, 6:09 AM · Restricted Project

Wed, Jul 10

mcberg2017 committed rGf4572249d78d: Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe… (authored by mcberg2017).
Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe…
Wed, Jul 10, 11:26 AM
mcberg2017 committed rL365679: Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe….
Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe…
Wed, Jul 10, 11:23 AM
mcberg2017 closed D64450: Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe to more aligned checks that reflect context.
Wed, Jul 10, 11:23 AM · Restricted Project
mcberg2017 updated subscribers of D64450: Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe to more aligned checks that reflect context.
Wed, Jul 10, 11:23 AM · Restricted Project

Tue, Jul 9

mcberg2017 created D64450: Move three folds for FADD, FSUB and FMUL in the DAG combiner away from Unsafe to more aligned checks that reflect context.
Tue, Jul 9, 2:43 PM · Restricted Project

Mon, Jun 17

mcberg2017 committed rGf9bff2a55e74: Propagate fmf in IRTranslate for fneg (authored by mcberg2017).
Propagate fmf in IRTranslate for fneg
Mon, Jun 17, 4:18 PM
mcberg2017 committed rL363631: Propagate fmf in IRTranslate for fneg.
Propagate fmf in IRTranslate for fneg
Mon, Jun 17, 4:17 PM
mcberg2017 closed D63458: Propagate fmf in IRTranslate for fneg.
Mon, Jun 17, 4:17 PM · Restricted Project
mcberg2017 updated the diff for D63458: Propagate fmf in IRTranslate for fneg.

With cloned tests for FMF.

Mon, Jun 17, 3:52 PM · Restricted Project

Jun 17 2019

mcberg2017 updated the diff for D63458: Propagate fmf in IRTranslate for fneg.

There was an existing test, here it is with the modification for FMF

Jun 17 2019, 3:21 PM · Restricted Project
mcberg2017 created D63458: Propagate fmf in IRTranslate for fneg.
Jun 17 2019, 1:53 PM · Restricted Project
mcberg2017 accepted D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

Ok.

Jun 17 2019, 11:05 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

So I agree, but I think there should be a target specific combine with guards for Unsafe and nsz and this legalization case (for those who do not have it).

Jun 17 2019, 11:05 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

For your target. But as a catch all for legalization should do this.

Jun 17 2019, 10:58 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

We do this as a combine earlier in target specific code under this constraint. Matt, perhaps you just missing that combine in GlobalIsel?

Jun 17 2019, 10:56 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

I am saying you have it right Matt for using MI flags, but we should guard folding based on Unsafe or nsz in the Flags.

Jun 17 2019, 10:34 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

SDAG fails isNegatibleForFree if that constraint is not met and we do not translate.

Jun 17 2019, 10:29 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

Should we not also guard GlobslIsel translation in this case and avoid if not met?

Jun 17 2019, 10:21 AM
mcberg2017 added a comment to D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

Ok, with the constraint like in the DAG:

Jun 17 2019, 10:16 AM
mcberg2017 accepted D63405: GlobalISel: Don't lose fneg flags when lowering to fsub.

Seems reasonable to me.

Jun 17 2019, 8:25 AM

Jun 14 2019

mcberg2017 committed rGad6bb86b2dc0: adding more fmf propagation for selects plus updated tests (authored by mcberg2017).
adding more fmf propagation for selects plus updated tests
Jun 14 2019, 9:52 PM
mcberg2017 committed rL363484: adding more fmf propagation for selects plus updated tests.
adding more fmf propagation for selects plus updated tests
Jun 14 2019, 9:51 PM
mcberg2017 added a comment to rL363474: adding more fmf propagation for selects plus tests.

I was just about to change the test to assembler check test, not using the assert path...

Jun 14 2019, 8:55 PM
mcberg2017 committed rG69394bedc54c: adding more fmf propagation for selects plus tests (authored by mcberg2017).
adding more fmf propagation for selects plus tests
Jun 14 2019, 4:30 PM
mcberg2017 committed rL363474: adding more fmf propagation for selects plus tests.
adding more fmf propagation for selects plus tests
Jun 14 2019, 4:30 PM

Jun 3 2019

mcberg2017 committed rG6ff978ee0546: Propagate fmf for setcc in SDAG for select folds (authored by mcberg2017).
Propagate fmf for setcc in SDAG for select folds
Jun 3 2019, 2:51 PM
mcberg2017 committed rL362448: Propagate fmf for setcc in SDAG for select folds.
Propagate fmf for setcc in SDAG for select folds
Jun 3 2019, 2:51 PM
mcberg2017 committed rG0b7f98da6569: Propagate fmf for setcc/select folds (authored by mcberg2017).
Propagate fmf for setcc/select folds
Jun 3 2019, 12:11 PM
mcberg2017 committed rL362439: Propagate fmf for setcc/select folds.
Propagate fmf for setcc/select folds
Jun 3 2019, 12:09 PM
mcberg2017 closed D62552: Propagate fmf for setcc/select folds.
Jun 3 2019, 12:09 PM · Restricted Project

May 28 2019

mcberg2017 created D62552: Propagate fmf for setcc/select folds.
May 28 2019, 3:31 PM · Restricted Project

May 1 2019

mcberg2017 accepted D61331: [SelectionDAG] remove constant folding limitations based on FP exceptions.

LGTM, thanks Sanjay

May 1 2019, 1:32 PM · Restricted Project

Apr 30 2019

mcberg2017 added a reviewer for D61331: [SelectionDAG] remove constant folding limitations based on FP exceptions: scanon.
Apr 30 2019, 1:49 PM · Restricted Project

Apr 18 2019

mcberg2017 committed rGd573aa0156b6: [NFC] FMF propagation for GlobalIsel (authored by mcberg2017).
[NFC] FMF propagation for GlobalIsel
Apr 18 2019, 11:49 AM
mcberg2017 committed rL358702: [NFC] FMF propagation for GlobalIsel.
[NFC] FMF propagation for GlobalIsel
Apr 18 2019, 11:48 AM

Feb 6 2019

mcberg2017 committed rGf0d81a31b628: Move IR flag handling directly into builder calls for cases translated from… (authored by mcberg2017).
Move IR flag handling directly into builder calls for cases translated from…
Feb 6 2019, 11:58 AM
mcberg2017 committed rL353336: Move IR flag handling directly into builder calls for cases translated from….
Move IR flag handling directly into builder calls for cases translated from…
Feb 6 2019, 11:57 AM
mcberg2017 closed D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel.
Feb 6 2019, 11:57 AM · Restricted Project

Feb 5 2019

mcberg2017 updated the diff for D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel.

Migrated flag copy utility function to MachineInstr as a static function.

Feb 5 2019, 7:30 PM · Restricted Project

Feb 4 2019

mcberg2017 added a reviewer for D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel: volkan.
Feb 4 2019, 12:32 PM · Restricted Project

Feb 1 2019

mcberg2017 created D57630: Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel.
Feb 1 2019, 4:23 PM · Restricted Project

Jan 28 2019

mcberg2017 committed rL352396: [NFC] TLI query with default(on) behavior wrt DAG combines for fmin/fmax target….
[NFC] TLI query with default(on) behavior wrt DAG combines for fmin/fmax target…
Jan 28 2019, 10:04 AM

Dec 18 2018

mcberg2017 committed rL349514: Add FMF management to common fp intrinsics in GlobalIsel.
Add FMF management to common fp intrinsics in GlobalIsel
Dec 18 2018, 9:58 AM
mcberg2017 closed D55668: Add FMF management to common fp intrinsics in GlobalIsel.
Dec 18 2018, 9:58 AM

Dec 17 2018

mcberg2017 updated the diff for D55668: Add FMF management to common fp intrinsics in GlobalIsel.

Updated for posterity with the post review changes...

Dec 17 2018, 8:24 PM

Dec 16 2018

mcberg2017 added a reviewer for D55668: Add FMF management to common fp intrinsics in GlobalIsel: bogner.
Dec 16 2018, 12:06 PM
mcberg2017 updated the diff for D55668: Add FMF management to common fp intrinsics in GlobalIsel.

As requested, add one more component for copy ir flags in to this review

Dec 16 2018, 12:06 PM

Dec 13 2018

mcberg2017 retitled D55668: Add FMF management to common fp intrinsics in GlobalIsel from Add FMF management to common fp intrinsics to Add FMF management to common fp intrinsics in GlobalIsel.
Dec 13 2018, 1:02 PM
mcberg2017 created D55668: Add FMF management to common fp intrinsics in GlobalIsel.
Dec 13 2018, 1:01 PM

Oct 30 2018

mcberg2017 accepted D53874: [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negative.
Oct 30 2018, 1:17 PM
mcberg2017 added inline comments to D53874: [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negative.
Oct 30 2018, 1:17 PM
mcberg2017 added inline comments to D53874: [InstSimplify] fold 'fcmp nnan oge X, 0.0' when X is not negative.
Oct 30 2018, 11:21 AM

Sep 19 2018

mcberg2017 added a comment to rL342576: Copy utilities updated and added for MI flags.

The fixed test for WebAssembly is in rL342598.

Sep 19 2018, 3:59 PM
mcberg2017 committed rL342598: [WEB] add new flags to a DebugInfo lit test.
[WEB] add new flags to a DebugInfo lit test
Sep 19 2018, 3:58 PM
mcberg2017 added a comment to rL342576: Copy utilities updated and added for MI flags.

Ok, looking into it now.

Sep 19 2018, 2:47 PM
mcberg2017 committed rL342576: Copy utilities updated and added for MI flags.
Copy utilities updated and added for MI flags
Sep 19 2018, 11:53 AM
mcberg2017 closed D52006: Copy utilities updated and added for MI flags.
Sep 19 2018, 11:53 AM

Sep 13 2018

mcberg2017 updated the diff for D52006: Copy utilities updated and added for MI flags.

Changed copyIRFlags as suggested...

Sep 13 2018, 12:05 PM

Sep 12 2018

mcberg2017 created D52006: Copy utilities updated and added for MI flags.
Sep 12 2018, 3:40 PM
mcberg2017 committed rL342081: Guard FMF context by excluding some FP operators from FPMathOperator.
Guard FMF context by excluding some FP operators from FPMathOperator
Sep 12 2018, 2:11 PM
mcberg2017 closed D51145: Guard FMF context by excluding some FP operators from FPMathOperator.
Sep 12 2018, 2:11 PM

Sep 11 2018

mcberg2017 committed rL341996: add IR flags to MI.
add IR flags to MI
Sep 11 2018, 2:37 PM
mcberg2017 closed D51738: add IR flags to MI.
Sep 11 2018, 2:37 PM
mcberg2017 retitled D51145: Guard FMF context by excluding some FP operators from FPMathOperator from make copyFMF consistent with AnyDefined for detection of any FMF flag set to true to Guard FMF context by excluding some FP operators from FPMathOperator.
Sep 11 2018, 2:31 PM
mcberg2017 updated the diff for D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Collapsed for single version...

Sep 11 2018, 2:18 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Hal/Sanjay could one of you have a look at this code, it would be great to wrap it up...

Sep 11 2018, 8:13 AM

Sep 10 2018

mcberg2017 added a comment to D51738: add IR flags to MI.

All the nsw/nuw context is set above SDAG currently in code that is common to both GlobalIsel and SDAG, meaning adding them to MI should be analogous to SDAG as a pass through and for detection of already derived context for actions and side effects. Currently SDAG does have some DAG combining opts that utilize these flags. MI should too for GlobalIsel to map existing optimizations and functionality, else GlobalIsel will be handicapped. Having said that, if we do due diligence to map SDAG context in GlobalIsel, then there should be no new poison state, only that which currently exists. We should also keep the door open for new SDAG optimizations under nsw/nuw to map into that space to provide parity of support.

Sep 10 2018, 11:49 AM

Sep 8 2018

mcberg2017 added a comment to D51738: add IR flags to MI.

The flags were requested for support in GlobalIsel, where there is a plan to make use of them once they are available. The path through SelectionDAG could also make use of the flags.

Sep 8 2018, 12:53 PM

Sep 6 2018

mcberg2017 updated the diff for D51738: add IR flags to MI.
Sep 6 2018, 11:14 AM
mcberg2017 updated the diff for D51738: add IR flags to MI.

With the appropriate test file...

Sep 6 2018, 10:36 AM
mcberg2017 added a comment to D51738: add IR flags to MI.

I have a test case which will show shortly...

Sep 6 2018, 10:30 AM
mcberg2017 added reviewers for D51738: add IR flags to MI: spatel, hfinkel, wristow.
Sep 6 2018, 10:30 AM
mcberg2017 created D51738: add IR flags to MI.
Sep 6 2018, 10:30 AM
mcberg2017 committed rL341565: [NFC] - in preparation for adding nsw, nuw and exact as flags to MI.
[NFC] - in preparation for adding nsw, nuw and exact as flags to MI
Sep 6 2018, 10:12 AM

Sep 4 2018

mcberg2017 updated the diff for D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

I added one more non fmf instruction and there is room to add others if needed.

Sep 4 2018, 1:28 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Thanks, that is a good alternative. I am testing it internally to see I get similar coverage. More later...

Sep 4 2018, 12:10 PM

Aug 31 2018

mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

In the newly created test case above, as checked in for test/CodeGen/X86/intersect-fma-fmf.ll, we get precisely this scenario. From a debug session breakpointed in llvm::SelectionDAGBuilder::visit at the line containing Node->intersectFlagsWith(IncomingFlags);
The Instruction in question is: %tmp11 = extractelement <4 x float> %tmp10, i32 1 as seen by the debugger, the Node we are associating it to is: t7: f32 = fadd nnan ninf nsz arcp contract afn reassoc t6, t5.
The extractelement is an Instruction that never carries flags and qualifies under

Aug 31 2018, 1:34 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Another data point, this change caused no drift in the lit tests, meaning none of our FMF opts managed in the lit tests are modified by the behavior.

Aug 31 2018, 12:00 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Correctly stated, but out of context. Some clarity first. The kinds of instructions in our case are neither strict nor fast, they never carry flags. Neither scalarization nor partial vectorization should cause FMF obliteration. Perhaps we need additional mechanisms?

Aug 31 2018, 11:58 AM

Aug 30 2018

mcberg2017 updated the diff for D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

With the test file sync'd

Aug 30 2018, 4:17 PM
mcberg2017 committed rL341138: [NFC] adding initial intersect test for Node to Instruction association.
[NFC] adding initial intersect test for Node to Instruction association
Aug 30 2018, 3:44 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

I have a smaller test case now, its baseline analog should show up in the tree in a bit...

Aug 30 2018, 3:38 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

without the change:

Aug 30 2018, 3:13 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

I will have both with and without assembler example shortly, added here. As for the test case, it is pretty close to minimal with context needed for association, but I will see if I can shrink it a bit after the assembler is up.

Aug 30 2018, 2:23 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Copying all available flags as false should not change the initial state of the object after its creation. It only does so because we are using AnyDefined as a sticky bit for assignment of any flag regardless of value. My notion is that any true value indicates that at least a value is set to something other than a default value (false). The test conditions occurs in partial vectorization and in our case, after scalarization on gpus where interior math operations occur. It happens frequently in our cases. The problem is when an instruction is associated to a Node that does have flags and where the Instruction it is associated to does not. This only ever occurs where the association is disjunct, meaning the Node and the Instruction originated differently. Generally its the other way around, where Node is empty and we are inheriting flags from an Instruction as the Instruction originated the Node in question. All other operations of intersect are done from Node to Node, ergo this change does not modify that behavior, that only occurs in this context.

Aug 30 2018, 2:12 PM
mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

Comments, alternatives?

Aug 30 2018, 12:11 PM

Aug 22 2018

mcberg2017 added a comment to D51145: Guard FMF context by excluding some FP operators from FPMathOperator.

The attached test is a x86 approximation of internal tests, altered for platform, which show this problem which occurs frequently on many FMF optimization contexts.

Aug 22 2018, 5:42 PM
mcberg2017 created D51145: Guard FMF context by excluding some FP operators from FPMathOperator.
Aug 22 2018, 5:18 PM

Aug 20 2018

mcberg2017 committed rL340222: extend binop folds for selects to include true and false binops flag….
extend binop folds for selects to include true and false binops flag…
Aug 20 2018, 3:27 PM
mcberg2017 closed D50996: extend binop folds for selects to include true and false binops flag intersection.
Aug 20 2018, 3:27 PM
mcberg2017 added a comment to D50996: extend binop folds for selects to include true and false binops flag intersection.

Actually the other test in rL339938 shows the positive side, where both binops are fast to show the intersection in /test/Transforms/LoopVectorize/reduction.ll

Aug 20 2018, 2:47 PM
mcberg2017 added a comment to rL339938: add a missed case for binary op FMF propagation under select folds.

Adding note for related side effect handled in D50996 and reported in https://bugs.llvm.org/show_bug.cgi?id=38641

Aug 20 2018, 2:41 PM
mcberg2017 added a comment to D50996: extend binop folds for selects to include true and false binops flag intersection.

The select_meta test has a directly related case in it that maps to the bug test case in https://bugs.llvm.org/show_bug.cgi?id=38641

Aug 20 2018, 2:35 PM
mcberg2017 created D50996: extend binop folds for selects to include true and false binops flag intersection.
Aug 20 2018, 2:34 PM

Aug 16 2018

mcberg2017 committed rL339938: add a missed case for binary op FMF propagation under select folds.
add a missed case for binary op FMF propagation under select folds
Aug 16 2018, 2:00 PM

Aug 9 2018

mcberg2017 committed rL339357: extend folding fsub/fadd to fneg for FMF.
extend folding fsub/fadd to fneg for FMF
Aug 9 2018, 10:01 AM
mcberg2017 closed D50195: extend folding fsub/fadd to fneg for FMF.
Aug 9 2018, 10:00 AM

Aug 8 2018

mcberg2017 updated the diff for D50195: extend folding fsub/fadd to fneg for FMF.

With the flags added...

Aug 8 2018, 9:05 PM