diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-10-11 23:56:56 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-10-11 23:56:56 +0000 |
commit | 56b6660d2ed92f3d879eac6e49e70e9279aca9da (patch) | |
tree | f9c85ee83b530f6fd58cc8f95c2489bc01eaf604 /llvm/test/CodeGen/X86/extract-insert.ll | |
parent | df398bd5fe1f318b018ac1280ac264d4098b34e2 (diff) | |
download | bcm5719-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.ll | 4 |
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: |