[PATCH] D104282: [FuncSpec] Use std::pow instead of operator^
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 14 23:08:23 PDT 2021
ChuanqiXu added inline comments.
================
Comment at: llvm/test/Transforms/FunctionSpecialization/function-specialization-recursive.ll:41-42
define i32 @main() {
; CHECK-LABEL: @main(
-; CHECK-NEXT: [[TEMP_I:%.*]] = alloca i32, align 4
-; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32* [[TEMP_I]] to i8*
-; CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull [[TMP1]])
-; CHECK-NEXT: call void @print_val(i32 1)
-; CHECK-NEXT: store i32 2, i32* [[TEMP_I]], align 4
-; CHECK-NEXT: call void @recursiveFunc(i32* nonnull [[TEMP_I]])
-; CHECK-NEXT: [[TMP2:%.*]] = bitcast i32* [[TEMP_I]] to i8*
-; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull [[TMP2]])
+; CHECK-NEXT: call void @recursiveFunc(i32* nonnull @Global)
; CHECK-NEXT: ret i32 0
----------------
Now it couldn't specialize recursiveFunc due to the change of cost model. I would try to fix it by considering branch condition in getUserBonus.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104282/new/
https://reviews.llvm.org/D104282
More information about the llvm-commits
mailing list