[PATCH] D73907: [InstCombine] correct operands of shouldChangeType() for casted phi transform
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 9 08:56:25 PST 2020
spatel added a comment.
In D73907#1865494 <https://reviews.llvm.org/D73907#1865494>, @lebedev.ri wrote:
> CC'ing `Align` suspects
>
> In D73907#1865490 <https://reviews.llvm.org/D73907#1865490>, @mstorsjo wrote:
>
> > This causes failed asserts for me. With https://martin.st/temp/substtml-preproc.c, built with `clang -target i686-w64-mingw32 -c -O2 substtml-preproc.c`, I'm getting this:
> >
> > clang: ../include/llvm/Support/Alignment.h:384: llvm::Align llvm::operator/(llvm::Align, uint64_t): Assertion `Lhs != 1 && "Can't halve byte alignment"' failed.
> >
>
I'm not seeing a bug in this patch itself. Here's a reduced test that crashes with that assert with only "opt -codegenprepare":
target datalayout = "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-w64-windows-gnu"
define void @ttml_read_coords(float %x, i64* %p) {
%b = bitcast float %x to i32
%z = zext i32 0 to i64
%s = shl nuw nsw i64 %z, 32
%z2 = zext i32 %b to i64
%o = or i64 %s, %z2
store i64 %o, i64* %p, align 1
ret void
}
I'll try to fix this tomorrow if nobody else gets to it sooner.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73907/new/
https://reviews.llvm.org/D73907
More information about the llvm-commits
mailing list