[llvm] [VectorCombine] Pass flags during IR creation (PR #193271)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 03:05:56 PDT 2026
================
@@ -1293,6 +1299,83 @@ bool VectorCombine::scalarizeVPIntrinsic(Instruction &I) {
return true;
}
+Value *VectorCombine::createUnaryOp(Instruction::UnaryOps Opcode,
+ Value *Operand, UnaryOperator *OldI) {
+ switch (Opcode) {
+ case Instruction::FNeg:
+ return Builder.CreateFNegFMF(Operand, OldI,
+ OldI->getName() + ".scalar.fneg");
+ case Instruction::UnaryOpsEnd:
+ llvm_unreachable("Invalid unary opcode");
+ }
+ llvm_unreachable("Invalid unary opcode");
+}
+
+Value *VectorCombine::createBinaryOp(Instruction::BinaryOps Opcode, Value *LHS,
+ Value *RHS, BinaryOperator *OldI) {
+ Twine Prefix = OldI->getName() + ".scalar.";
----------------
arsenm wrote:
Shouldn't have a Twine stored like this. This will fail a sanitizer build when the temporary string is destroyed
https://github.com/llvm/llvm-project/pull/193271
More information about the llvm-commits
mailing list