10 Commits

Author SHA1 Message Date
Nicolai Hähnle
d0a125a1e6 Scalarizer: use the canonical form of {extract,insert}element
This leads to a bunch of trivial test churn, plus some extra test changes
that are purely due to update_test_checks.

Pulled out of https://reviews.llvm.org/D149842 as a preparatory change.

Differential Revision: https://reviews.llvm.org/D149944
2023-05-05 13:05:31 +02:00
Nicolai Hähnle
34c0ed58d2 test/Transforms/Scalarizer: re-run update_test_checks.py
Goal is to get a cleaner diff in an upcoming functional change.
2022-12-05 21:24:48 +01:00
Manuel Brito
1e55d5b1f2 Use poison instead of undef as placeholder for vector construction [NFC]
Differential Revision: https://reviews.llvm.org/D138450
2022-11-21 18:43:23 +00:00
Bjorn Pettersson
54608b40eb [test][Scalarizer] Convert test cases to opaque pointers. NFC
Test cases were converted using the script at
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34
2022-10-03 22:37:58 +02:00
Bjorn Pettersson
e9320b1a95 [NewPM][test] Only use -passes syntax in Scalarizer lit tests
With legacy PM being deprecated it should be enough to verify the
scalarizer pass using the new-PM syntax when invoking opt.
2021-10-20 15:16:18 +02:00
Juneyoung Lee
1fc992bd86 [Scalarizer] Use poison as insertelement's placeholder
This patch makes Scalarizer to use poison as insertelement's placeholder.

It contains two changes in Scalarizer.cpp, and the both changes does not change the semantics of the optimized program.
It is because the placeholder value (poison) is already completely hidden by following insertelement instructions.

The first change at visitBitCastInst() creates poison vector of MidTy and consecutively inserts FanIn times,
which is # of elems of MidTy.
The second change at ScalarizerVisitor::finish() creates poison with Op->getType(), and it is filled with
Count insertelements.

The test diffs show that the poison value is never exposed after insertelements.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D93989
2021-01-04 00:35:28 +09:00
Simon Pilgrim
0654eb5702 [Scalarizer] Remove unused check-prefixes 2020-11-09 10:37:17 +00:00
Roman Lebedev
51f9310ff2
[Scalarizer] ExtractElement handling w/ variable insert index (PR46524)
Summary:
Similar to D82961.

Reviewers: bjope, cameron.mcinally, arsenm, jdoerfert

Reviewed By: jdoerfert

Subscribers: arphaman, wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82970
2020-07-06 13:19:33 +03:00
Roman Lebedev
e98030a55f
[NFC][Scalarizer] Also scalarize loads in newly-added tests
Should help better showcase improvements
2020-07-03 02:37:29 +03:00
Roman Lebedev
739c7a0a04
[NFC][Scalarizer] Add some insertelement/extractelement tests
See D82961/D82970/D83101/D83102.
2020-07-03 02:04:47 +03:00