[PATCH] D23974: [TargetLowering] remove fdiv and frem from canOpTrap() (PR29114)
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 06:40:59 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL279970: [TargetLowering] remove fdiv and frem from canOpTrap() (PR29114) (authored by spatel).
Changed prior to commit:
https://reviews.llvm.org/D23974?vs=69516&id=69565#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23974
Files:
llvm/trunk/include/llvm/Target/TargetLowering.h
llvm/trunk/lib/CodeGen/TargetLoweringBase.cpp
llvm/trunk/test/CodeGen/X86/vec3.ll
Index: llvm/trunk/include/llvm/Target/TargetLowering.h
===================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h
+++ llvm/trunk/include/llvm/Target/TargetLowering.h
@@ -592,7 +592,7 @@
/// Returns true if the operation can trap for the value type.
///
/// VT must be a legal type. By default, we optimistically assume most
- /// operations don't trap except for divide and remainder.
+ /// operations don't trap except for integer divide and remainder.
virtual bool canOpTrap(unsigned Op, EVT VT) const;
/// Similar to isShuffleMaskLegal. This is used by Targets can use this to
Index: llvm/trunk/test/CodeGen/X86/vec3.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/vec3.ll
+++ llvm/trunk/test/CodeGen/X86/vec3.ll
@@ -19,16 +19,8 @@
define <3 x float> @fdiv(<3 x float> %v, float %d) {
; CHECK-LABEL: fdiv:
; CHECK: # BB#0:
-; CHECK-NEXT: movaps %xmm1, %xmm2
-; CHECK-NEXT: movaps %xmm0, %xmm3
-; CHECK-NEXT: movaps %xmm1, %xmm4
-; CHECK-NEXT: divss %xmm0, %xmm1
-; CHECK-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,2,3]
-; CHECK-NEXT: divss %xmm0, %xmm2
-; CHECK-NEXT: movhlps {{.*#+}} xmm3 = xmm3[1,1]
-; CHECK-NEXT: divss %xmm3, %xmm4
-; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
-; CHECK-NEXT: unpcklps {{.*#+}} xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
+; CHECK-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,0,0,3]
+; CHECK-NEXT: divps %xmm0, %xmm1
; CHECK-NEXT: movaps %xmm1, %xmm0
; CHECK-NEXT: retq
;
Index: llvm/trunk/lib/CodeGen/TargetLoweringBase.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringBase.cpp
+++ llvm/trunk/lib/CodeGen/TargetLoweringBase.cpp
@@ -955,15 +955,11 @@
return getScalarShiftAmountTy(DL, LHSTy);
}
-/// canOpTrap - Returns true if the operation can trap for the value type.
-/// VT must be a legal type.
bool TargetLoweringBase::canOpTrap(unsigned Op, EVT VT) const {
assert(isTypeLegal(VT));
switch (Op) {
default:
return false;
- case ISD::FDIV:
- case ISD::FREM:
case ISD::SDIV:
case ISD::UDIV:
case ISD::SREM:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23974.69565.patch
Type: text/x-patch
Size: 2243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160829/0a21599b/attachment.bin>
More information about the llvm-commits
mailing list