Skip to content

Commit 26ed065

Browse files
authored
Revert "[DXIL] Add radians intrinsic (#110616)"
This reverts commit 1e75d08.
1 parent b2c615f commit 26ed065

File tree

3 files changed

+0
-92
lines changed

3 files changed

+0
-92
lines changed

llvm/include/llvm/IR/IntrinsicsDirectX.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,4 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]
8686
def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>;
8787
def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>;
8888
def int_dx_step : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, LLVMMatchType<0>], [IntrNoMem]>;
89-
def int_dx_radians : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]>;
9089
}

llvm/lib/Target/DirectX/DXILIntrinsicExpansion.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ static bool isIntrinsicExpansion(Function &F) {
6464
case Intrinsic::dx_udot:
6565
case Intrinsic::dx_sign:
6666
case Intrinsic::dx_step:
67-
case Intrinsic::dx_radians:
6867
return true;
6968
}
7069
return false;
@@ -443,14 +442,6 @@ static Value *expandStepIntrinsic(CallInst *Orig) {
443442
return Builder.CreateSelect(Cond, Zero, One);
444443
}
445444

446-
static Value *expandRadiansIntrinsic(CallInst *Orig) {
447-
Value *X = Orig->getOperand(0);
448-
Type *Ty = X->getType();
449-
IRBuilder<> Builder(Orig);
450-
Value *PiOver180 = ConstantFP::get(Ty, llvm::numbers::pi / 180.0);
451-
return Builder.CreateFMul(X, PiOver180);
452-
}
453-
454445
static Intrinsic::ID getMaxForClamp(Type *ElemTy,
455446
Intrinsic::ID ClampIntrinsic) {
456447
if (ClampIntrinsic == Intrinsic::dx_uclamp)
@@ -570,9 +561,6 @@ static bool expandIntrinsic(Function &F, CallInst *Orig) {
570561
break;
571562
case Intrinsic::dx_step:
572563
Result = expandStepIntrinsic(Orig);
573-
case Intrinsic::dx_radians:
574-
Result = expandRadiansIntrinsic(Orig);
575-
break;
576564
}
577565
if (Result) {
578566
Orig->replaceAllUsesWith(Result);

llvm/test/CodeGen/DirectX/radians.ll

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)