[polly] r297464 - [unittest] Translate isl tests to C++ bindings
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 14:38:22 PST 2017
On Fri, Mar 10, 2017, at 07:26 PM, Michael Kruse via llvm-commits wrote:
> 2017-03-10 15:58 GMT+01:00 Tobias Grosser via llvm-commits
> <llvm-commits at lists.llvm.org>:
> > {
> > APInt APNOne(32, (1ull << 32) - 1, false);
> > - auto *IslNOne = isl_valFromAPInt(IslCtx, APNOne, false);
> > - auto *IslRef = isl_val_int_from_ui(IslCtx, (1ull << 32) - 1);
> > - EXPECT_EQ(isl_bool_true, isl_val_eq(IslNOne, IslRef));
> > - isl_val_free(IslNOne);
> > - isl_val_free(IslRef);
> > + auto IslNOne = valFromAPInt(IslCtx, APNOne, false);
> > + auto IslRef = isl::val(IslCtx, (1ull << 32) - 1);
> > + EXPECT_EQ(IslNOne, IslRef);
> > }
>
> > {
> > - auto *IslNOne = isl_val_int_from_ui(IslCtx, (1ull << 32) - 1);
> > + auto IslNOne = isl::val(IslCtx, (1ull << 32) - 1);
> > auto APNOne = APIntFromVal(IslNOne);
> > EXPECT_EQ((1ull << 32) - 1, APNOne);
> > EXPECT_EQ(33u, APNOne.getBitWidth());
> > }
>
> These now fail on Windows. Previously, it was using
> isl_val_int_from_ui, not effectively isl_val_int_from_si. "long" on
> Windows is 32 bits, meaning the value represented is -1, not
> 4294967295.
r297522
Thanks,
Tobias
More information about the llvm-commits
mailing list