[PATCH] D47425: [GlobalISel][Legalizer] Fix i1s being sign extended instead of zero-extended
Roman Tereshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 29 13:59:57 PDT 2018
rtereshin added inline comments.
================
Comment at: test/CodeGen/AArch64/GlobalISel/legalize-bool.mir:7
+
+ define i1 @test() {
+ entry:
----------------
Defining this function with `zeroext` return value attribute, like `test/CodeGen/AArch64/arm64-xaluo.ll` does for instance, seems to fix the problem w/ no changes to the compiler.
================
Comment at: test/CodeGen/AArch64/GlobalISel/legalize-bool.mir:29
+ %0:_(s1) = G_CONSTANT i1 true
+ %1:_(s32) = G_ANYEXT %0(s1)
+ $w0 = COPY %1(s32)
----------------
The input explicitly says anyext s1 to s32, it doesn't looks like it's legalizer's problem to fix this.
Repository:
rL LLVM
https://reviews.llvm.org/D47425
More information about the llvm-commits
mailing list