5 Commits

Author SHA1 Message Date
Paschalis Mpeis
e4790ce209
[TLI] ReplaceWithVecLib: drop Instruction support (#94365)
Refactor the pass to only support `IntrinsicInst` calls.

`ReplaceWithVecLib` used to support instructions, as AArch64 was using
this pass to replace a vectorized frem instruction to the fmod vector
library call (through TLI).

As this replacement is now done by the codegen (#83859), there is no
need for this pass to support instructions.

Additionally, removed 'frem' tests from:
- AArch64/replace-with-veclib-armpl.ll
- AArch64/replace-with-veclib-sleef-scalable.ll
- AArch64/replace-with-veclib-sleef.ll

Such testing is done at codegen level:
- #83859
2024-06-10 08:37:00 +01:00
Paschalis Mpeis
6ad4ed5f1d
[VecLib] Fix: Restore DebugFlag state in ReplaceWithVecLibTest (#78989)
It appears that Google Tests run multiple modules from the same
invocation.
As a result setting `llvm::DebugFlag` in this pass kept it on in
subsequent passes, which is not the expected behavior.
2024-01-23 15:57:19 +00:00
Paschalis Mpeis
8e514c572e
Reapply [TLI] Fix replace-with-veclib crash with invalid arguments (#77945)
Fix a crash of `replace-with-veclib` pass, when the arguments of the TLI
mapping do not match the original call.
Now, it simply ignores such cases.

Test require assertions as it accesses programmatically the debug log.

Reapplies reverted PR #77112
2024-01-16 10:00:15 +00:00
Paschalis Mpeis
a300b24037 Revert "[TLI] Fix replace-with-veclib crash with invalid arguments (#77112)"
This reverts commit 9fdc568824b0992d48704dfa530a12073cc02f5e,
as it linker crashes on some platforms.
2024-01-12 15:49:15 +00:00
Paschalis Mpeis
9fdc568824
[TLI] Fix replace-with-veclib crash with invalid arguments (#77112)
Fix a crash of `replace-with-veclib` pass, when the arguments of the TLI
mapping do not match the original call.
Now, it simply ignores such cases.

Test require assertions as it accesses programmatically the debug log.
2024-01-12 15:19:52 +00:00