=?utf-8?q?Félix?= Cloutier <[email protected]>, =?utf-8?q?Félix?= Cloutier <[email protected]>, =?utf-8?q?Félix?= Cloutier <[email protected]>, =?utf-8?q?Félix?= Cloutier <[email protected]> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
brunodf-snps wrote: > The diff is > [here](https://github.com/swiftlang/llvm-project/compare/apple-fcloutier/139397212...swiftlang:llvm-project:apple-fcloutier/139397212-O0?expand=1). I was a bit surprised by this diff. Your description says this affects the -O0 behavior, but I think it rather affects the codegen for `-fstrict-bool` (which is the default)? Before this would be range metadata + truncate, now it is range metadata + nonzero. (The effect of -O0 was always that the range metadata is omitted.) I suppose that the LLVM optimizer can know that truncate and nonzero on an i8 in the range [0,2[ is the same thing, but this does seem to trigger different code: https://godbolt.org/z/e6YavTMx8 This does not seem wise, I think -O -fstrict-bool (the default), should stick to range metadata + truncate. Also, this diff changes the behavior for `BitInt(1)`. As remarked before, this type both has `isBitInt()` and `hasBooleanRepresentation()`. I don't know if this is deliberate. https://github.com/llvm/llvm-project/pull/160790 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
