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
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.
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
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.