https://bugs.llvm.org/show_bug.cgi?id=37879
Bug ID: 37879
Summary: Folding i64 scalar masking breaks isel
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
The following LLVM IR fails to compile with any optimizations on:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: norecurse nounwind readonly uwtable
define double @foo(i32** nocapture readonly) #0 {
%2 = load i64, i64* undef, align 8
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
%5 = sitofp i64 %2 to double
%6 = select i1 %4, double 1.000000e+00, double %5
ret double %6
}
attributes #0 = { "target-features"="+avx512bw" }
The "and 1/icmp 0" expression for scalar masking is folded by the code
introduced in D45203. This code has checks to ensure that the scalar_to_vector
DAG node is not connected to an i16 input, but doesn't have the equivalent
check against i64 inputs.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs