[llvm-bugs] [Bug 39016] New: [DAGCombine] Missed extractelement(bitcast(scalar_to_vector()) combine
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 20 07:11:28 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39016
Bug ID: 39016
Summary: [DAGCombine] Missed
extractelement(bitcast(scalar_to_vector()) combine
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com
define i32 @test(i64 %a0) {
%1 = insertelement <2 x i64> zeroinitializer, i64 %a0, i32 0
%2 = bitcast <2 x i64> %1 to <4 x i32>
%3 = extractelement <4 x i32> %2, i32 0
ret i32 %3
}
llc -mtriple=x86_64-unknown
test: # @test
movq %rdi, %xmm0
movd %xmm0, %eax
retq
This could be reduced to:
test: # @test
mov %edi, %eax
retq
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180920/adca5031/attachment.html>
More information about the llvm-bugs
mailing list