[llvm-bugs] [Bug 45481] New: Can't remove insertelement undef

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 9 02:03:34 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45481

            Bug ID: 45481
           Summary: Can't remove insertelement undef
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Keywords: miscompilation
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: nunoplopes at sapo.pt
                CC: lebedev.ri at gmail.com, llvm-bugs at lists.llvm.org,
                    regehr at cs.utah.edu, spatel+llvm at rotateright.com

Test: Transforms/InstSimplify/insertelement.ll
Summary: We can't remove insertelement undef to a vector, since it may be
replacing a poison value.

define <4 x i32> @PR1286(<4 x i32> %A) {
  %B = insertelement <4 x i32> %A, i32 undef, i32 1
  ret <4 x i32> %B
}
=>
define <4 x i32> @PR1286(<4 x i32> %A) {
  ret <4 x i32> %A
}
Transformation doesn't verify!
ERROR: Target is more poisonous than source

Example:
<4 x i32> %A = < poison, poison, poison, poison >

Source:
<4 x i32> %B = < poison, undef, poison, poison >

Target:
Source value: < poison, undef, poison, poison >
Target value: < poison, poison, poison, poison >


Report:
https://web.ist.utl.pt/nuno.lopes/alive2/index.php?hash=ed3ac07d4817b221&test=Transforms%2FInstSimplify%2Finsertelement.ll

-- 
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/20200409/d0b86ddc/attachment.html>


More information about the llvm-bugs mailing list