Page MenuHomePhabricator
Feed Advanced Search

Yesterday

pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Address review comments.

Sat, Dec 14, 5:36 PM · Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Sat, Dec 14, 5:30 PM · Restricted Project
pengfei retitled D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic. from [X86] Check if source elements are not structures before using a uniform base for the Gather/Scatter intrinsic. to [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Sat, Dec 14, 7:13 AM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Removed unnecessary loop condition.
Added a vectorized index test.
Don't check if constant exist in DAG.

Sat, Dec 14, 5:54 AM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Removed unnecessary else.

Sat, Dec 14, 4:41 AM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Removed unnecessary assertions. Merged some common code.

Sat, Dec 14, 4:32 AM · Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Sat, Dec 14, 3:21 AM · Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Sat, Dec 14, 3:12 AM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Optimized as Yuanke's suggestion.

Sat, Dec 14, 1:42 AM · Restricted Project

Fri, Dec 13

pengfei added a comment to D62731: Add support for options -frounding-math, -ftrapping-math, -ffp-model=, and -ffp-exception-behavior=, : Specify floating point behavior.

It's good that people are looking at achieving better modeling for the x86 backend, but we need to have a plan that doesn't require heroic effort just to get basic correctness.

Do you mean in the backend? If so, I don't think that's possible. The backends just don't have any sort of feature that could be used to get conservatively correct behavior for cheap the way intrinsics give it to us in the middle end. Once you go into instruction selection things get very low level in a hurry.

I'm looking for simple ways to modeling X86 intrinsics, but haven't find better one than modeling it one by one.

I would suggest that we need a function/call attribute roughly on the level of readonly / readnone, maybe readfponly, that says that a function has no side-effects and no dependencies on anything *except* the FP state.

Do you mean mark it at the declaration of intrinsics? Is it reasonable to mark except on dependent intrinsics?

Basic queries like Instruction::mayReadMemory() that are supposed to be used generically in code-motion transforms would then return true for calls marked that way only if they're FP-constrained functions.

Middle end or back end? I think in middle end you may need to change all releated passes to get such information to prevent optimization. And in back end, I think we can simply chain intrinsics marked except with other FP nodes like what common code doing.

Fri, Dec 13, 6:10 PM · Restricted Project, Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Fri, Dec 13, 12:50 AM · Restricted Project

Thu, Dec 12

pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Thu, Dec 12, 11:28 PM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

We don't need to check if constant is defined.

Thu, Dec 12, 11:28 PM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Using gep_type_iterator to traverse.

Thu, Dec 12, 9:52 PM · Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Thu, Dec 12, 9:52 PM · Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Thu, Dec 12, 7:46 PM · Restricted Project
pengfei added inline comments to D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Thu, Dec 12, 7:37 PM · Restricted Project
pengfei updated the diff for D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..

Updated to only check the final type.

Thu, Dec 12, 7:10 PM · Restricted Project
pengfei created D71442: [X86] Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic..
Thu, Dec 12, 4:29 PM · Restricted Project

Tue, Dec 10

pengfei committed rG21bc8631fe93: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86 (authored by pengfei).
[FPEnv][X86] Constrained FCmp intrinsics enabling on X86
Tue, Dec 10, 4:27 PM
pengfei closed D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Tue, Dec 10, 4:27 PM · Restricted Project
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Change signalling to signaling to follow common code and IEEE754

Tue, Dec 10, 4:12 AM · Restricted Project
pengfei added a comment to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

signaling->signalling

Not to be too nitpicky, but I've been using the US spelling (with one 'l') in the common code parts of the patch :-) Should we be consistent here?

Tue, Dec 10, 4:12 AM · Restricted Project
pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Tue, Dec 10, 1:28 AM · Restricted Project
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Fix the push order issue.

Tue, Dec 10, 1:28 AM · Restricted Project
pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Tue, Dec 10, 1:19 AM · Restricted Project
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Address review comments.

Tue, Dec 10, 1:10 AM · Restricted Project
pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Tue, Dec 10, 12:52 AM · Restricted Project
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Revert changes to CondCodeAction.
X86 doesn't need to separate the signalling actions from quiet.

Tue, Dec 10, 12:52 AM · Restricted Project
pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Tue, Dec 10, 12:06 AM · Restricted Project

Mon, Dec 9

pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Fix few format problems.

Mon, Dec 9, 11:48 PM · Restricted Project
pengfei added a comment to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Thanks for the review!

Mon, Dec 9, 11:21 PM · Restricted Project
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Address review comments.

Mon, Dec 9, 11:12 PM · Restricted Project
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Add signaling intrinsic handling.

Mon, Dec 9, 7:19 AM · Restricted Project

Fri, Dec 6

pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Fri, Dec 6, 12:54 AM · Restricted Project

Thu, Dec 5

pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Thu, Dec 5, 8:06 PM · Restricted Project
pengfei added inline comments to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Thu, Dec 5, 6:44 PM · Restricted Project
pengfei added a comment to D69281: [FPEnv] Constrained FCmp intrinsics.

Adding an extra argument to the DAGnode (sort of like FP_ROUND) also need special code all over the place to handle ...

Hi @uweigand, I don't quite understand why we need special code all over the place to handle. From what I can see, STRICT_FSETCCS always have the same action with STRICT_FSETCC in common code.

I had the variant with the extra operand implemented initially, and what I was seeing was that made the node "special" because now we don't have the same set of operands between SETCC and STRICT_FSETCC any more. Usually, the STRICT_ opcodes have the same set of operands as the regular operands, with the exception of the chain. Code tends to assume that this is the case (e.g. when morphing a strict node into a regular node, or when writing a single legalization or other transformation that applies to both the strict and the regular node). Having not just the chain, but one additional extra operand required code changes to handle that operand in various places. Instead, with two DAG opcodes, you usually just have to add two more cases to a switch and that's it.

But those were really minor issues; the primary reason for me to switch was that I needed a way to tell common code which operations are legal, where the ISA has differences between signaling and quiet operations. (On Z we always have both for scalar types, but for vector types we got the signaling operations at a later ISA level than the quiet ones). This is trivial with two opcodes, but would require quite a bit of custom code if when using just a single one.

Thu, Dec 5, 4:33 PM · Restricted Project
pengfei added a comment to D69281: [FPEnv] Constrained FCmp intrinsics.

Adding an extra argument to the DAGnode (sort of like FP_ROUND) also need special code all over the place to handle ...

Hi @uweigand, I don't quite understand why we need special code all over the place to handle. From what I can see, STRICT_FSETCCS always have the same action with STRICT_FSETCC in common code.

Thu, Dec 5, 6:11 AM · Restricted Project

Tue, Dec 3

pengfei added a comment to D70874: [X86] Add initialization of MXCSR in llvm-exegesis.

Please note that currently we only state the rounding modes and the IEEE masks bits of MXCSR. This means instructions like VRSQRT14PS, which only have dependence on FTZ and DAZ, wouldn't be modeled.

FTZ and DAZ are modeled now by commit rGc8995de06994. Thanks.

Tue, Dec 3, 5:24 PM · Restricted Project
pengfei committed rGc8995de06994: [X86] Model DAZ and FTZ (authored by pengfei).
[X86] Model DAZ and FTZ
Tue, Dec 3, 4:38 PM
pengfei closed D70938: [X86] Model DAZ and FTZ.
Tue, Dec 3, 4:38 PM · Restricted Project
pengfei committed rGc1c673303dcf: [X86] Model MXCSR for all AVX512 instructions (authored by pengfei).
[X86] Model MXCSR for all AVX512 instructions
Tue, Dec 3, 4:29 PM
pengfei closed D70881: [X86] Model MXCSR for all AVX512 instructions.
Tue, Dec 3, 4:28 PM · Restricted Project

Mon, Dec 2

pengfei added inline comments to D70938: [X86] Model DAZ and FTZ.
Mon, Dec 2, 10:03 PM · Restricted Project
pengfei updated the diff for D70938: [X86] Model DAZ and FTZ.

Address review comments.

Mon, Dec 2, 10:03 PM · Restricted Project
pengfei added inline comments to D70881: [X86] Model MXCSR for all AVX512 instructions.
Mon, Dec 2, 9:35 PM · Restricted Project
pengfei updated the diff for D70881: [X86] Model MXCSR for all AVX512 instructions.

Address review comments.

Mon, Dec 2, 9:35 PM · Restricted Project
pengfei updated the diff for D70938: [X86] Model DAZ and FTZ.

Add test case.

Mon, Dec 2, 7:36 PM · Restricted Project
pengfei added a child revision for D70881: [X86] Model MXCSR for all AVX512 instructions: D70938: [X86] Model DAZ and FTZ.
Mon, Dec 2, 7:18 PM · Restricted Project
pengfei created D70938: [X86] Model DAZ and FTZ.
Mon, Dec 2, 7:18 PM · Restricted Project
pengfei added a parent revision for D70938: [X86] Model DAZ and FTZ: D70881: [X86] Model MXCSR for all AVX512 instructions.
Mon, Dec 2, 7:18 PM · Restricted Project
pengfei added a comment to D70881: [X86] Model MXCSR for all AVX512 instructions.

I think SAE instructions and embedded rounding instructions still read the DAZ and FTZ bits from MXCSR

I think so, but currently we don't model DAZ and FTZ, right?

The comment in X86RegisterInfo.td says that, but where was that discussed?

Mon, Dec 2, 5:26 PM · Restricted Project
pengfei committed rGcf81714a7eb3: [X86] Model MXCSR for AVX instructions other than AVX512 (authored by pengfei).
[X86] Model MXCSR for AVX instructions other than AVX512
Mon, Dec 2, 4:58 PM
pengfei closed D70875: [X86] Model MXCSR for AVX instructions other than AVX512.
Mon, Dec 2, 4:58 PM · Restricted Project
pengfei added a comment to D70881: [X86] Model MXCSR for all AVX512 instructions.
Mon, Dec 2, 4:16 PM · Restricted Project
pengfei added a comment to D70903: [llvm-exegesis] Fix 44b9942898c7..

Thanks and sorry for the mistake.

Mon, Dec 2, 4:07 PM · Restricted Project
pengfei added a comment to D70891: [X86] Add initialization of FPCW in llvm-exegesis.

Thanks for the review!

Mon, Dec 2, 4:21 AM · Restricted Project
pengfei committed rG76b70f6f75e9: [X86] Add initialization of FPCW in llvm-exegesis (authored by pengfei).
[X86] Add initialization of FPCW in llvm-exegesis
Mon, Dec 2, 4:21 AM
pengfei closed D70891: [X86] Add initialization of FPCW in llvm-exegesis.
Mon, Dec 2, 4:21 AM · Restricted Project
pengfei created D70891: [X86] Add initialization of FPCW in llvm-exegesis.
Mon, Dec 2, 3:44 AM · Restricted Project
pengfei added a comment to D70874: [X86] Add initialization of MXCSR in llvm-exegesis.

We make sure that every register that is used by an instruction in the snippet is initialized. This is to avoid having fluctuations in measurements due to performance depending on values in registers. I think it's great if SSE/AVX instructions start explicitly state their deps on MXCSR, because the behaviour does indeed depend on the value of these flags.

Thanks for the explanation. Please note that currently we only state the rounding modes and the IEEE masks bits of MXCSR. This means instructions like VRSQRT14PS, which only have dependence on FTZ and DAZ, wouldn't be modeled.

Mon, Dec 2, 2:41 AM · Restricted Project
pengfei committed rG44b9942898c7: [X86] Add initialization of MXCSR in llvm-exegesis (authored by pengfei).
[X86] Add initialization of MXCSR in llvm-exegesis
Mon, Dec 2, 2:32 AM
pengfei closed D70874: [X86] Add initialization of MXCSR in llvm-exegesis.
Mon, Dec 2, 2:32 AM · Restricted Project
pengfei updated the diff for D70881: [X86] Model MXCSR for all AVX512 instructions.

Address review comments.

Mon, Dec 2, 2:14 AM · Restricted Project
pengfei added a comment to D70881: [X86] Model MXCSR for all AVX512 instructions.

Removed MXCSR and mayRaiseExceptions from SAE opcodes.

Mon, Dec 2, 2:14 AM · Restricted Project

Sun, Dec 1

pengfei added a child revision for D70875: [X86] Model MXCSR for AVX instructions other than AVX512: D70881: [X86] Model MXCSR for all AVX512 instructions.
Sun, Dec 1, 6:12 PM · Restricted Project
pengfei added a parent revision for D70881: [X86] Model MXCSR for all AVX512 instructions: D70875: [X86] Model MXCSR for AVX instructions other than AVX512.
Sun, Dec 1, 6:12 PM · Restricted Project
pengfei created D70881: [X86] Model MXCSR for all AVX512 instructions.
Sun, Dec 1, 6:11 PM · Restricted Project
pengfei added a comment to D70874: [X86] Add initialization of MXCSR in llvm-exegesis.

I'm not sure I understand why this needs to be initialized. Why don't we need to do it for FPCW?

Sun, Dec 1, 2:17 AM · Restricted Project
pengfei updated the diff for D70874: [X86] Add initialization of MXCSR in llvm-exegesis.

Fix typo.

Sun, Dec 1, 1:59 AM · Restricted Project
pengfei added inline comments to D70874: [X86] Add initialization of MXCSR in llvm-exegesis.
Sun, Dec 1, 1:59 AM · Restricted Project

Sat, Nov 30

pengfei added a child revision for D70874: [X86] Add initialization of MXCSR in llvm-exegesis: D70875: [X86] Model MXCSR for AVX instructions other than AVX512.
Sat, Nov 30, 10:05 PM · Restricted Project
pengfei added a parent revision for D70875: [X86] Model MXCSR for AVX instructions other than AVX512: D70874: [X86] Add initialization of MXCSR in llvm-exegesis.
Sat, Nov 30, 10:05 PM · Restricted Project
pengfei created D70875: [X86] Model MXCSR for AVX instructions other than AVX512.
Sat, Nov 30, 10:05 PM · Restricted Project
pengfei created D70874: [X86] Add initialization of MXCSR in llvm-exegesis.
Sat, Nov 30, 9:56 PM · Restricted Project

Wed, Nov 27

pengfei committed rG1bc5c52afdcb: [X86][NFC] Rename test file for following changes. (authored by pengfei).
[X86][NFC] Rename test file for following changes.
Wed, Nov 27, 11:12 PM

Tue, Nov 26

pengfei accepted D70706: [X86][NFC] Modify the testcase name.

LGTM.

Tue, Nov 26, 4:33 AM · Restricted Project

Mon, Nov 25

pengfei updated subscribers of D69986: [X86] Bugfix for rL349334.
Mon, Nov 25, 10:01 PM · Restricted Project
pengfei committed rG92f1446b8b8a: [X86] Updated strict fp scalar tests and add fp80 tests for D68857, NFC. (authored by pengfei).
[X86] Updated strict fp scalar tests and add fp80 tests for D68857, NFC.
Mon, Nov 25, 9:45 PM
pengfei added a comment to D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

@pengfei : I've updated the D69281 patch, which will require follow-on changes here. In particular, signaling comparisons (STRICT_FSETCCS) need to be handled.

Mon, Nov 25, 5:40 PM · Restricted Project
pengfei accepted D70504: [X86] Add support for STRICT_FP_ROUND/STRICT_FP_EXTEND from/to fp128 to/from f32/f64/f80 in 64-bit mode..

LGTM.

Mon, Nov 25, 5:31 PM · Restricted Project

Fri, Nov 22

pengfei added a comment to D70504: [X86] Add support for STRICT_FP_ROUND/STRICT_FP_EXTEND from/to fp128 to/from f32/f64/f80 in 64-bit mode..

LGTM.

Fri, Nov 22, 12:05 AM · Restricted Project

Thu, Nov 21

pengfei added inline comments to D70504: [X86] Add support for STRICT_FP_ROUND/STRICT_FP_EXTEND from/to fp128 to/from f32/f64/f80 in 64-bit mode..
Thu, Nov 21, 9:28 PM · Restricted Project
pengfei committed rG085d7847aa6d: [X86] Add option 'disable-strictnode-mutation' for tests that respect strict fp… (authored by pengfei).
[X86] Add option 'disable-strictnode-mutation' for tests that respect strict fp…
Thu, Nov 21, 8:33 PM
pengfei updated the diff for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.

Fix a bug & Add Fix me to tests.

Thu, Nov 21, 7:39 PM · Restricted Project
pengfei added a child revision for D69281: [FPEnv] Constrained FCmp intrinsics: D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Thu, Nov 21, 6:35 PM · Restricted Project
pengfei added a parent revision for D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86: D69281: [FPEnv] Constrained FCmp intrinsics.
Thu, Nov 21, 6:35 PM · Restricted Project
pengfei created D70582: [FPEnv][X86] Constrained FCmp intrinsics enabling on X86.
Thu, Nov 21, 6:35 PM · Restricted Project
pengfei committed rG22a0edd070e4: [FPEnv] Add an option to disable strict float node mutating to an normal float… (authored by pengfei).
[FPEnv] Add an option to disable strict float node mutating to an normal float…
Thu, Nov 21, 6:08 PM
pengfei closed D70226: Add an option to disable strict float node mutating to an normal float node.
Thu, Nov 21, 6:08 PM · Restricted Project

Tue, Nov 19

pengfei added a comment to D70224: [WinEH] Fix the wrong alignment orientation during calculating EH frame..

Thanks for the reminding! I will follow this rule in future work.

Tue, Nov 19, 7:48 PM · Restricted Project

Mon, Nov 18

pengfei added a comment to D70226: Add an option to disable strict float node mutating to an normal float node.

My main point is that the difference between 1) and 3) has to be determined on a case-by-case basis by inspecting the particular expansion sequence, and therefore this should be checked in-line in each expansion sequence. This is why I'd prefer to have each affected custom expansion sequence implementation directly the flag check whether or not strict semantics must be enforced or not; I don't believe this can be a single check just at the top of ExpandNode.

Thanks for the explanation! It very helpful for us to understand the workflow of strict semantics.

Mon, Nov 18, 5:58 PM · Restricted Project
pengfei updated subscribers of D70226: Add an option to disable strict float node mutating to an normal float node.
Mon, Nov 18, 6:58 AM · Restricted Project

Sun, Nov 17

pengfei added a comment to D70224: [WinEH] Fix the wrong alignment orientation during calculating EH frame..

Thanks for the detailed guidance. I have merged it to 9.0 branch now. Thank you!

Sun, Nov 17, 5:46 PM · Restricted Project
pengfei committed rG3437c7fc4470: [WinEH] Fix the wrong alignment orientation during calculating EH frame. (authored by pengfei).
[WinEH] Fix the wrong alignment orientation during calculating EH frame.
Sun, Nov 17, 5:12 PM

Nov 15 2019

pengfei added inline comments to D70226: Add an option to disable strict float node mutating to an normal float node.
Nov 15 2019, 1:08 AM · Restricted Project

Nov 14 2019

pengfei added a comment to D70224: [WinEH] Fix the wrong alignment orientation during calculating EH frame..

Hi @rnk, I guess we need to merge it to 9.0 branch, right? I haven't did such before, do I need wait for someone approval? Is there someone responsible for committing, or I can do it myself?

Nov 14 2019, 6:07 PM · Restricted Project
pengfei committed rG8723b95cefa4: [WinEH] Fix the wrong alignment orientation during calculating EH frame. (authored by pengfei).
[WinEH] Fix the wrong alignment orientation during calculating EH frame.
Nov 14 2019, 5:49 PM
pengfei closed D70224: [WinEH] Fix the wrong alignment orientation during calculating EH frame..
Nov 14 2019, 5:49 PM · Restricted Project