[llvm] [AMDGPU] Constant folding of llvm.amdgcn.trig.preop (PR #98562)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 11:38:38 PDT 2024


================
@@ -5707,10 +5701,36 @@ define double @trig_preop_variable_args(double %arg0, i32 %arg1) {
 
 define double @trig_preop_constfold() {
 ; CHECK-LABEL: @trig_preop_constfold(
-; CHECK-NEXT:    [[VAL:%.*]] = call double @llvm.amdgcn.trig.preop.f64(double 3.454350e+02, i32 5)
-; CHECK-NEXT:    ret double [[VAL]]
+; CHECK-NEXT:    ret double 0x394A6EE06DB14ACC
----------------
changpeng wrote:

Yes, verified with an OpenCL program using the builtin to make the outputs.

https://github.com/llvm/llvm-project/pull/98562


More information about the llvm-commits mailing list