summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/extract-insert.ll
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-10-11 23:56:56 +0000
committerSanjay Patel <spatel@rotateright.com>2018-10-11 23:56:56 +0000
commit56b6660d2ed92f3d879eac6e49e70e9279aca9da (patch)
treef9c85ee83b530f6fd58cc8f95c2489bc01eaf604 /llvm/test/CodeGen/X86/extract-insert.ll
parentdf398bd5fe1f318b018ac1280ac264d4098b34e2 (diff)
downloadbcm5719-llvm-56b6660d2ed92f3d879eac6e49e70e9279aca9da.tar.gz
bcm5719-llvm-56b6660d2ed92f3d879eac6e49e70e9279aca9da.zip
[DAGCombiner] rearrange extract_element+bitcast fold; NFC
I want to add another pattern here that includes scalar_to_vector, so this makes that patch smaller. I was hoping to remove the hasOneUse() check because it shouldn't be necessary for common codegen, but an AMDGPU test has a comment suggesting that the extra check makes things better on one of those targets. llvm-svn: 344320
Diffstat (limited to 'llvm/test/CodeGen/X86/extract-insert.ll')
-rw-r--r--llvm/test/CodeGen/X86/extract-insert.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/extract-insert.ll b/llvm/test/CodeGen/X86/extract-insert.ll
index de8ee704b88..b3fb50de718 100644
--- a/llvm/test/CodeGen/X86/extract-insert.ll
+++ b/llvm/test/CodeGen/X86/extract-insert.ll
@@ -28,6 +28,10 @@ define i8 @extractelt_bitcast(i32 %x) nounwind {
ret i8 %ext
}
+; TODO: This should have folded to avoid vector ops, but the transform
+; is guarded by 'hasOneUse'. That limitation apparently makes some AMDGPU
+; codegen better.
+
define i8 @extractelt_bitcast_extra_use(i32 %x, <4 x i8>* %p) nounwind {
; X86-LABEL: extractelt_bitcast_extra_use:
; X86: # %bb.0:
OpenPOWER on IntegriCloud