Page MenuHomePhabricator

mcberg2017 (Michael Berg)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 18 2017, 1:54 PM (113 w, 16 h)

Recent Activity

Fri, Sep 13

mcberg2017 added a comment to D67564: [IR] allow fast-math-flags on phi of FP values.

WRT divergent phi FMF, if you wanted to be pessimistic you could do an intersection(and), doing an inclusion(or) might include too much. Either way behavior would change. The intersection already has other prior context in FMF.

Fri, Sep 13, 2:59 PM · Restricted Project

Thu, Aug 22

mcberg2017 added a comment to D61675: [WIP] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator.

Follow on note from D66612, I am testing the rest of the Reassociate.cpp changes that were talked about there(+some tests as well). Cameron, do you want to incorporate those changes here?

Thu, Aug 22, 6:57 PM · Restricted Project
mcberg2017 accepted D66612: [Reassoc] Small fix to support unary FNeg in NegateValue(...).
Thu, Aug 22, 3:25 PM · Restricted Project
mcberg2017 added a comment to D66612: [Reassoc] Small fix to support unary FNeg in NegateValue(...).

BTW, general comment: Many of the remaining BinaryOperator contexts in Reassociate.cpp will need re-examaination too as UnaryOperator may also be present in places where it currently is not.

Thu, Aug 22, 1:05 PM · Restricted Project
mcberg2017 added a comment to D66612: [Reassoc] Small fix to support unary FNeg in NegateValue(...).

LGTM, but I will give Sanjay some time before moving forward.

Thu, Aug 22, 12:43 PM · Restricted Project

Tue, Aug 20

mcberg2017 added a comment to D61675: [WIP] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator.

Cameron here is an example with the issue:

Tue, Aug 20, 2:53 PM · Restricted Project

Mon, Aug 19

mcberg2017 added a comment to D61675: [WIP] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator.

Just putting a place holder for NegateValue in Reassociate.cpp to be updated for both binary and unary context when examining the uses of the Value V. In fact the full file should be looked over for other cases as well. I tried out the current patch and we hit the first case pretty quickly internally.

Mon, Aug 19, 2:46 PM · Restricted Project
mcberg2017 added a comment to D65954: [Reassociate] try harder to convert negative FP constants to positive.

Just to close the loop, the issues I saw are internal manifested only, they do not port to other targets.

Mon, Aug 19, 10:00 AM · Restricted Project

Aug 9 2019

mcberg2017 accepted D65954: [Reassociate] try harder to convert negative FP constants to positive.
Aug 9 2019, 11:42 AM · Restricted Project

Aug 8 2019

mcberg2017 added a comment to D65954: [Reassociate] try harder to convert negative FP constants to positive.

Tell you what, I don't want to hold up this patch. I will see if I can abstract a test example into common form for a public target with an example or two and send it to you offline.

Aug 8 2019, 1:53 PM · Restricted Project
mcberg2017 added a comment to D65954: [Reassociate] try harder to convert negative FP constants to positive.

We have some stir(some regressions - a few instructions here and there), however the change is overall beneficial for us.

Aug 8 2019, 12:11 PM · Restricted Project
mcberg2017 added a comment to D65954: [Reassociate] try harder to convert negative FP constants to positive.

I worked through some of the tests, but would like another set of eyes to verify. Doing a quick internal validation with this for regressions.

Aug 8 2019, 10:55 AM · Restricted Project
mcberg2017 added inline comments to D65954: [Reassociate] try harder to convert negative FP constants to positive.
Aug 8 2019, 9:09 AM · Restricted Project

Jul 31 2019

mcberg2017 committed rG005d705d4392: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize… (authored by mcberg2017).
Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize…
Jul 31 2019, 3:03 PM
mcberg2017 committed rL367486: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize….
Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize…
Jul 31 2019, 3:01 PM
mcberg2017 closed D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.
Jul 31 2019, 3:01 PM · Restricted Project
mcberg2017 updated the diff for D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.

added a TODO comment for machine combines in test/CodeGen/AArch64/fadd-combines.ll,
test/CodeGen/PowerPC/fma-mutate.ll, test/CodeGen/PowerPC/qpx-recipest.ll, test/CodeGen/PowerPC/recipest.ll, test/CodeGen/X86/fp-fold.ll now have just standard CHECK lines. The fmf contract flag was
removed from test/CodeGen/X86/dagcombine-unsafe-math.ll and test/CodeGen/X86/fp-fast.ll.

Jul 31 2019, 11:01 AM · Restricted Project

Jul 30 2019

mcberg2017 updated the diff for D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.

Note: test/CodeGen/AMDGPU/fneg-combines.ll needs rearchitecting, so i left it in options flag form, test/CodeGen/PowerPC/fmf-propagation.ll has portions that can be removed once we stop using the options flags and so i am leaving it in its current form with mods until that happens. test/CodeGen/X86/fp-fast.ll uses a subset of fmf that equate to the options flag that were used (let me know if you just want to generalize to fast or smaller subset), all the others use either fast or context relevant fmf and have been converted to not use options flags. Have a look and see what needs editing, currently this all passes testing.

Jul 30 2019, 12:53 PM · Restricted Project

Jul 29 2019

mcberg2017 added a comment to D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.

The new code is actually better by 1 instruction, we just never completed the full match on the test. In the old path we had -enable-no-signed-zeros-fp-math on but no way to reach it for the zero fold of the fadd via llc as the flags are all user controlled. This should not be a regression.

Jul 29 2019, 12:26 PM · Restricted Project
mcberg2017 added a comment to D65399: [InstCombine] canonicalize fneg before fmul/fdiv.

How about we add a TODO comment regarding Cameron's topic wrt? Would that be sufficient?

Jul 29 2019, 11:46 AM · Restricted Project
mcberg2017 accepted D65399: [InstCombine] canonicalize fneg before fmul/fdiv.

Turning off inst combining fneg opts does not make things better for us however. It seems to consistently cause additional regressions. We can live with the new change then.

Jul 29 2019, 11:37 AM · Restricted Project
mcberg2017 added a comment to D65399: [InstCombine] canonicalize fneg before fmul/fdiv.

General comment: For us internally at Apple this does cause regressions, its small but there. Mostly because fneg becomes a side effect for fp arithmetic ops for us. I would request a target info guard which we can turn off to avoid the drift. If not, this is small enough to live with,

Jul 29 2019, 10:45 AM · Restricted Project
mcberg2017 added inline comments to D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.
Jul 29 2019, 10:32 AM · Restricted Project
mcberg2017 added inline comments to D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.
Jul 29 2019, 9:51 AM · Restricted Project

Jul 24 2019

mcberg2017 updated the diff for D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.

updated with one case...

Jul 24 2019, 12:47 PM · Restricted Project

Jul 23 2019

mcberg2017 added inline comments to D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.
Jul 23 2019, 4:00 PM · Restricted Project
mcberg2017 created D65170: Migrate some more fadd and fsub cases away from UnsafeFPMath control to utilize NoSignedZerosFPMath options control.
Jul 23 2019, 3:57 PM · Restricted Project

Jul 15 2019

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.

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

Jul 10 2019

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…
Jul 10 2019, 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…
Jul 10 2019, 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.
Jul 10 2019, 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.
Jul 10 2019, 11:23 AM · Restricted Project

Jul 9 2019

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.
Jul 9 2019, 2:43 PM · Restricted Project

Jun 17 2019

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

With cloned tests for FMF.

Jun 17 2019, 3:52 PM · Restricted Project
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