The reduction initialization code creates a "naturally aligned null pointer to void lvalue", which I found somewhat odd, even though it works out in the end because it is not actually used. It doesn't look like this code actually needs an LValue for anything though, and we can use an invalid Address to represent this case instead.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
110 ms | x64 debian > LLVM.Bindings/Go::go.test |
Event Timeline
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
897–899 | Maybe move this code to the places where it actually used with some asserts instead of if? assert(SharedAddr.isValid() && ..); SharedAddr = CGF.Builder.CreateElementBitCast( SharedAddr, CGF.ConvertTypeForMem(SharedType)); And insert this code before lines 903 and 906. |
clang/lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
897–899 | Can we maybe drop this cast entirely? At least I don't get any test failures. emitAggregateInitialization() does its own cast so it's definitely not necessary for that case, but maybe emitInitWithReductionInitializer() does need it and it's not covered by tests. |
Maybe move this code to the places where it actually used with some asserts instead of if?
And insert this code before lines 903 and 906.