Skip to content

Commit f7c9618

Browse files
authored
[AMDGPU] 32-bit ABS is a legal DAG node (llvm#163907)
32-bit ABS can be lowered legally. --------- Signed-off-by: John Lu <[email protected]>
1 parent ab2ece0 commit f7c9618

File tree

7 files changed

+948
-1002
lines changed

7 files changed

+948
-1002
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM,
514514
MVT::i64, Custom);
515515
setOperationAction(ISD::SELECT_CC, MVT::i64, Expand);
516516

517-
setOperationAction({ISD::SMIN, ISD::UMIN, ISD::SMAX, ISD::UMAX}, MVT::i32,
518-
Legal);
517+
setOperationAction({ISD::ABS, ISD::SMIN, ISD::UMIN, ISD::SMAX, ISD::UMAX},
518+
MVT::i32, Legal);
519519

520520
setOperationAction(
521521
{ISD::CTTZ, ISD::CTTZ_ZERO_UNDEF, ISD::CTLZ, ISD::CTLZ_ZERO_UNDEF},

0 commit comments

Comments
 (0)