Files
clang-p2996/llvm/test/CodeGen/AMDGPU
Tim Renouf 6eaad1e539 [AMDGPU] Fixed incorrect uniform branch condition
Summary:
I had a case where multiple nested uniform ifs resulted in code that did
v_cmp comparisons, combining the results with s_and_b64, s_or_b64 and
s_xor_b64 and using the resulting mask in s_cbranch_vccnz, without first
ensuring that bits for inactive lanes were clear.

There was already code for inserting an "s_and_b64 vcc, exec, vcc" to
clear bits for inactive lanes in the case that the branch is instruction
selected as s_cbranch_scc1 and is then changed to s_cbranch_vccnz in
SIFixSGPRCopies. I have added the same code into SILowerControlFlow for
the case that the branch is instruction selected as s_cbranch_vccnz.

This de-optimizes the code in some cases where the s_and is not needed,
because vcc is the result of a v_cmp, or multiple v_cmp instructions
combined by s_and/s_or. We should add a pass to re-optimize those cases.

Reviewers: arsenm, kzhuravl

Subscribers: wdng, yaxunl, t-tye, llvm-commits, dstuttard, timcorringham, nhaehnle

Differential Revision: https://reviews.llvm.org/D41292

llvm-svn: 322119
2018-01-09 21:34:43 +00:00
..
2017-08-07 18:30:35 +00:00
2017-11-28 23:40:12 +00:00
2017-11-15 21:51:43 +00:00
2017-11-15 21:51:43 +00:00
2017-08-07 18:30:35 +00:00
2017-07-21 21:19:23 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 14:58:04 +00:00
2017-07-14 00:11:13 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-09-20 04:25:58 +00:00
2017-11-28 23:40:12 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-11-15 21:51:43 +00:00
2017-05-19 17:25:20 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-06-28 21:38:50 +00:00
2017-06-28 21:38:50 +00:00
2017-06-28 21:38:50 +00:00
2017-06-28 21:38:50 +00:00
2017-08-07 18:30:35 +00:00
2017-07-14 00:11:13 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00

+==============================================================================+
| How to organize the lit tests                                                |
+==============================================================================+

- If you write a test for matching a single DAG opcode or intrinsic, it should
  go in a file called {opcode_name,intrinsic_name}.ll (e.g. fadd.ll)

- If you write a test that matches several DAG opcodes and checks for a single
  ISA instruction, then that test should go in a file called {ISA_name}.ll (e.g.
  bfi_int.ll

- For all other tests, use your best judgement for organizing tests and naming
  the files.

+==============================================================================+
| Naming conventions                                                           |
+==============================================================================+

- Use dash '-' and not underscore '_' to separate words in file names, unless
  the file is named after a DAG opcode or ISA instruction that has an
  underscore '_' in its name.